a-ragab-h-m commited on
Commit
d6a350c
·
verified ·
1 Parent(s): a827798

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -99,9 +99,12 @@ with gr.Blocks(title="VRP Solver Interface") as demo:
99
  list_btn = gr.Button("List /data Files")
100
  file_output = gr.Textbox(label="Saved Files", lines=10)
101
  file_dropdown = gr.Dropdown(choices=[], label="Select File to Download")
102
- download_btn = gr.File(label="Download File")
103
-
 
104
  list_btn.click(fn=list_saved_files, outputs=[file_dropdown, file_output])
105
- file_dropdown.change(fn=download_file, inputs=file_dropdown, outputs=download_btn)
 
 
106
 
107
  demo.launch()
 
99
  list_btn = gr.Button("List /data Files")
100
  file_output = gr.Textbox(label="Saved Files", lines=10)
101
  file_dropdown = gr.Dropdown(choices=[], label="Select File to Download")
102
+ download_btn = gr.Button("⬇️ Download Selected File")
103
+ download_output = gr.File(label="Your File Will Appear Here")
104
+
105
  list_btn.click(fn=list_saved_files, outputs=[file_dropdown, file_output])
106
+ download_btn.click(fn=download_file, inputs=file_dropdown, outputs=download_output)
107
+
108
+
109
 
110
  demo.launch()