cbensimon HF Staff commited on
Commit
1bc970e
·
1 Parent(s): 64a3260

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from gradio.context import LocalContext
3
+
4
+ def greet(name):
5
+ request = LocalContext.request.get()
6
+ print(f"{request=}")
7
+ return "Hello " + name + "!!"
8
+
9
+ iface = gr.Interface(fn=greet, inputs="text", outputs="text")
10
+ iface.launch()