Spaces:
Runtime error
Runtime error
import gradio as gr | |
import os | |
# Set the flagging directory to a writable location | |
flagging_dir = "/tmp/flagged" | |
os.makedirs(flagging_dir, exist_ok=True) | |
def greet(name): | |
return f"Hello {name}!" | |
iface = gr.Interface(fn=greet, inputs="text", outputs="text", flagging_dir=flagging_dir) | |
iface.launch(share=True) |