m7n commited on
Commit
544c6b3
·
1 Parent(s): 3c6cb17

changed filename syntax back

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -37,8 +37,8 @@ def predict(request: gr.Request,text_input):
37
  """)
38
  file_path = static_dir / file_name
39
  os.chmod(file_path, 0o644)
40
- iframe = f'<iframe src="/file={file_path}" width="100%" height="500px"></iframe>'
41
- link = f'<a href="/file={file_path}" target="_blank">{file_name}</a>'
42
  print("Serving file at:", f"/file={file_path}")
43
  return link, iframe
44
 
@@ -58,4 +58,4 @@ The Gradio app generates dynamic HTML files and stores them in a static director
58
 
59
  new_btn.click(fn=predict, inputs=[text_input], outputs=[markdown, html])
60
 
61
- block.launch(debug=True, share=True, ssr_mode=False)#,ssr_mode=False
 
37
  """)
38
  file_path = static_dir / file_name
39
  os.chmod(file_path, 0o644)
40
+ iframe = f'<iframe src="/file=static/{file_name}" width="100%" height="500px"></iframe>'
41
+ link = f'<a href="/file=static/{file_name}" target="_blank">{file_name}</a>'
42
  print("Serving file at:", f"/file={file_path}")
43
  return link, iframe
44
 
 
58
 
59
  new_btn.click(fn=predict, inputs=[text_input], outputs=[markdown, html])
60
 
61
+ block.launch(debug=True, share=False, ssr_mode=False)#,ssr_mode=False