Spaces:
Running
on
Zero
Running
on
Zero
changed filename syntax back
Browse files
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={
|
41 |
-
link = f'<a href="/file={
|
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=
|
|
|
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
|