Spaces:
Sleeping
Sleeping
Create app.py
Browse files
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()
|