Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def chat(user_input):
|
4 |
+
bot_response = "hello world"
|
5 |
+
response = ""
|
6 |
+
for word in bot_response.split(" "):
|
7 |
+
response = response + " " + word
|
8 |
+
yield response
|
9 |
+
|
10 |
+
with gr.Blocks() as demo:
|
11 |
+
chatbot = gr.Chatbot()
|
12 |
+
textbox = gr.Textbox("Hello, how are you doing today?")
|
13 |
+
|
14 |
+
textbox.submit(chat, textbox, chatbot)
|
15 |
+
|
16 |
+
demo.queue().launch()
|