file-test / app.py
John6666's picture
Upload 4 files
fe3fa2d verified
raw
history blame contribute delete
528 Bytes
import gradio as gr
print("test1")
# write your code here or there
def test():
return "test2"
with gr.Blocks() as demo:
gr.Markdown("http://john6666-file-test.hf.space/gradio_api/file=tmp/a.txt")
gr.Markdown("http://john6666-file-test.hf.space/gradio_api/file=tmp2/a.txt")
run_button = gr.Button("Run", variant="primary")
info = gr.Textbox(label="Output", value="", show_copy_button=True)
run_button.click(test, None, [info])
demo.launch(ssr_mode=False, allowed_paths=["./tmp/"])