surprise / app.py
pushpinder08's picture
Update app.py
425fe35 verified
raw
history blame contribute delete
No virus
315 Bytes
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)