Spaces:
Sleeping
Sleeping
Commit
•
7378a57
1
Parent(s):
521f3f7
Upload app.py
Browse files
app.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def greet(name, request: gr.Request):
|
4 |
+
print(request.username)
|
5 |
+
return "Hello " + name + "!"
|
6 |
+
|
7 |
+
with gr.Blocks() as demo:
|
8 |
+
name = gr.Textbox(label="Name")
|
9 |
+
output = gr.Textbox(label="Output Box")
|
10 |
+
greet_btn = gr.Button("Greet")
|
11 |
+
greet_btn.click(fn=greet, inputs=name, outputs=output, api_name="greet")
|
12 |
+
|
13 |
+
demo.launch(auth=[("kerem", "123"), ("kerem2", "456")])
|