Spaces:
Sleeping
Sleeping
Create gradio_demo.py
Browse files- gradio_demo.py +17 -0
gradio_demo.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def greet(name, intensity):
|
4 |
+
return "Hello, " + name + "!" * int(intensity)
|
5 |
+
|
6 |
+
demo = gr.Interface(
|
7 |
+
fn=greet,
|
8 |
+
inputs=[
|
9 |
+
gr.Textbox(label="Your Name"),
|
10 |
+
gr.Slider(minimum=1, maximum=10, label="Excitement Level")
|
11 |
+
],
|
12 |
+
outputs=gr.Textbox(label="Greeting"),
|
13 |
+
title="Township Directory Chatbot Demo",
|
14 |
+
description="A quick demo for the Township Small Business Chatbot UI using Gradio."
|
15 |
+
)
|
16 |
+
|
17 |
+
demo.launch(share=True) # Generates public gradio.live URL
|