Omnibus commited on
Commit
a364a23
·
1 Parent(s): cc790ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -27,7 +27,7 @@ def update_rec_list():
27
  except Exception:
28
  pass
29
  return rec_list, gr.Dropdown(label="Recipient", choices=[f for f in rec_list])
30
- rec_list, rec_drop = update_rec_list()
31
 
32
  def up_rec():
33
  rec_list,rec_drop = update_rec_list()
@@ -99,13 +99,13 @@ with gr.Blocks() as app:
99
  message = f"Blockchain loaded from: {main_chain}{address}.json"
100
  #send_list,send_drop = update_send_list()
101
 
102
- rec_list,rec_drop = update_rec_list()
103
  #rec_drop = gr.Dropdown.update(label="Recipient", choices=[f for f in rec_list])
104
  return response,message,rec_drop
105
 
106
 
107
 
108
- input_key.change(crypt.address,input_key,sender).then(up_rec,None,rec)
109
  pass_btn.click(checkp,pass_box,[invalid,valida])
110
 
111
  gen_wal_btn.click(crypt.generate_keys,None,[out2,out1,img3,out3,img1,img2]).then(create_new_chain,[out3,img1],[response_json,block_text,rec]).then(test_fn,[img1],[input_key])
 
27
  except Exception:
28
  pass
29
  return rec_list, gr.Dropdown(label="Recipient", choices=[f for f in rec_list])
30
+ rec_list, rec_drop = chatchain.update_rec_list(main_chain)
31
 
32
  def up_rec():
33
  rec_list,rec_drop = update_rec_list()
 
99
  message = f"Blockchain loaded from: {main_chain}{address}.json"
100
  #send_list,send_drop = update_send_list()
101
 
102
+ rec_list,rec_drop = chatchain.update_rec_list()
103
  #rec_drop = gr.Dropdown.update(label="Recipient", choices=[f for f in rec_list])
104
  return response,message,rec_drop
105
 
106
 
107
 
108
+ input_key.change(crypt.address,input_key,sender).then(chatchain.update_rec_list,None,rec)
109
  pass_btn.click(checkp,pass_box,[invalid,valida])
110
 
111
  gen_wal_btn.click(crypt.generate_keys,None,[out2,out1,img3,out3,img1,img2]).then(create_new_chain,[out3,img1],[response_json,block_text,rec]).then(test_fn,[img1],[input_key])