Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -470,7 +470,11 @@ def issue_tokens(send,rec,amount):
|
|
| 470 |
repo = main_balance.split('datasets/',1)[1].split('/raw',1)[0].split('/',1)[0]
|
| 471 |
name = main_balance.split('datasets/',1)[1].split('/raw',1)[0].split('/',1)[1]
|
| 472 |
|
| 473 |
-
f_ist = (api.list_repo_files(repo_id=f'{repo}/{name}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 474 |
with gr.Blocks() as bc:
|
| 475 |
with gr.Row(visible=True) as invalid:
|
| 476 |
pass_box = gr.Textbox()
|
|
@@ -489,7 +493,7 @@ with gr.Blocks() as bc:
|
|
| 489 |
in_chain_btn=gr.Button("Load Chain")
|
| 490 |
create_bc = gr.Button("Create New Blockchain")
|
| 491 |
#send=gr.Textbox(label="Sender")
|
| 492 |
-
send = gr.Dropdown(label="Sender", choices=[f for f in
|
| 493 |
rec=gr.Textbox(label="Recipient")
|
| 494 |
am=gr.Textbox(label="Amount")
|
| 495 |
send_trans=gr.Button("Post Transaction")
|
|
|
|
| 470 |
repo = main_balance.split('datasets/',1)[1].split('/raw',1)[0].split('/',1)[0]
|
| 471 |
name = main_balance.split('datasets/',1)[1].split('/raw',1)[0].split('/',1)[1]
|
| 472 |
|
| 473 |
+
f_ist = (api.list_repo_files(repo_id=f'{repo}/{name}', repo_type="dataset"))
|
| 474 |
+
send_list =[]
|
| 475 |
+
for i,ea in enumerate(f_ist):
|
| 476 |
+
if "balance/" in ea:
|
| 477 |
+
send_list.append(ea.split("/",1)[1])
|
| 478 |
with gr.Blocks() as bc:
|
| 479 |
with gr.Row(visible=True) as invalid:
|
| 480 |
pass_box = gr.Textbox()
|
|
|
|
| 493 |
in_chain_btn=gr.Button("Load Chain")
|
| 494 |
create_bc = gr.Button("Create New Blockchain")
|
| 495 |
#send=gr.Textbox(label="Sender")
|
| 496 |
+
send = gr.Dropdown(label="Sender", choices=[f for f in send_list], value = "Bank")
|
| 497 |
rec=gr.Textbox(label="Recipient")
|
| 498 |
am=gr.Textbox(label="Amount")
|
| 499 |
send_trans=gr.Button("Post Transaction")
|