abidlabs HF Staff commited on
Commit
b2bd06d
·
verified ·
1 Parent(s): e4d3501

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def test(x, profile: gr.OAuthProfile | None):
4
+ if profile is None:
5
+ return "I don't know you."
6
+ return f"{x} {profile.name}"
7
+
8
+ with gr.Blocks() as demo:
9
+ t1 = gr.Textbox()
10
+ t2 = gr.Textbox()
11
+ t1.submit(test, t1, t2)
12
+
13
+ demo.launch()