anumaurya114exp commited on
Commit
89f4034
·
1 Parent(s): a6c6736

file downlad added

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -335,13 +335,10 @@ with gr.Blocks() as demo:
335
  #screen 4 for downloading logs
336
  with gr.Tab("Log-files"):
337
  downloadableFiles = getAllLogFilesUrls()
338
- buttons = []
339
  for downloadableFile in downloadableFiles:
340
- text_input = gr.Textbox(label = 'file url', value= downloadableFile["url"])
341
- button = gr.Button(f"Download {downloadableFile['name']}")
342
- button.click(lambda url: gr.run_js(f"window.open('{url}', '_blank')"), inputs=text_input)
343
- buttons.append(button)
344
 
345
-
346
- demo.launch(share=True, debug=True, ssl_verify=False, auth=checkAuth)
347
  dbEngine.connect()
 
335
  #screen 4 for downloading logs
336
  with gr.Tab("Log-files"):
337
  downloadableFiles = getAllLogFilesUrls()
338
+ fileComponents = []
339
  for downloadableFile in downloadableFiles:
340
+ fileComponent = gr.File(downloadableFile["url"])
341
+ fileComponents.append(fileComponent)
 
 
342
 
343
+ demo.launch(share=False, debug=True, ssl_verify=False, auth=checkAuth)
 
344
  dbEngine.connect()