test / app.py
Daniel Huynh
Added app file
1b92abf
raw
history blame
414 Bytes
import gradio as gr
import requests
def greet(name):
x = requests.get('https://w3schools.com/python/demopage.htm')
return x
with gr.Blocks() as demo:
name = gr.Textbox(label="Name")
output = gr.Textbox(label="Output Box")
greet_btn = gr.Button("Greet")
greet_btn.click(fn=greet, inputs=name, outputs=output)
demo.launch()
#print the response text (the content of the requested file):