Daniel Huynh
commited on
Commit
•
1b92abf
1
Parent(s):
41bf253
Added app file
Browse files
app.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import requests
|
3 |
+
|
4 |
+
def greet(name):
|
5 |
+
x = requests.get('https://w3schools.com/python/demopage.htm')
|
6 |
+
return x
|
7 |
+
|
8 |
+
with gr.Blocks() as demo:
|
9 |
+
name = gr.Textbox(label="Name")
|
10 |
+
output = gr.Textbox(label="Output Box")
|
11 |
+
greet_btn = gr.Button("Greet")
|
12 |
+
greet_btn.click(fn=greet, inputs=name, outputs=output)
|
13 |
+
|
14 |
+
demo.launch()
|
15 |
+
|
16 |
+
|
17 |
+
#print the response text (the content of the requested file):
|
18 |
+
|