pushpinder08 commited on
Commit
425fe35
1 Parent(s): 23ce71d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -1,8 +1,13 @@
1
  import gradio as gr
 
 
 
 
 
2
 
3
  def greet(name):
4
  return f"Hello {name}!"
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
 
8
  iface.launch(share=True)
 
1
  import gradio as gr
2
+ import os
3
+
4
+ # Set the flagging directory to a writable location
5
+ flagging_dir = "/tmp/flagged"
6
+ os.makedirs(flagging_dir, exist_ok=True)
7
 
8
  def greet(name):
9
  return f"Hello {name}!"
10
 
11
+ iface = gr.Interface(fn=greet, inputs="text", outputs="text", flagging_dir=flagging_dir)
12
 
13
  iface.launch(share=True)