Spaces:
Runtime error
Runtime error
vericudebuget
commited on
Commit
•
fb783c6
1
Parent(s):
fe66a68
Update app.py
Browse files
app.py
CHANGED
@@ -47,17 +47,21 @@ additional_inputs = [
|
|
47 |
]
|
48 |
|
49 |
with gr.Blocks(theme=gr.themes.Soft()):
|
50 |
-
chatbot = gr.Chatbot(
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
59 |
title="ConvoLite",
|
60 |
-
concurrency_limit=20,
|
61 |
theme=gr.themes.Soft(),
|
62 |
-
|
63 |
-
|
|
|
47 |
]
|
48 |
|
49 |
with gr.Blocks(theme=gr.themes.Soft()):
|
50 |
+
chatbot = gr.Chatbot()
|
51 |
+
text_input = gr.Textbox(label="Your message")
|
52 |
+
submit_btn = gr.Button("Submit")
|
53 |
+
|
54 |
+
def process_message(message, history):
|
55 |
+
history.append((message, generate(message, history, additional_inputs[0].value)))
|
56 |
+
return history, ""
|
57 |
+
|
58 |
+
submit_btn.click(process_message, inputs=[text_input, chatbot], outputs=[chatbot, text_input])
|
59 |
+
|
60 |
+
gr.Interface(
|
61 |
+
fn=None,
|
62 |
+
inputs=None,
|
63 |
+
outputs=None,
|
64 |
title="ConvoLite",
|
|
|
65 |
theme=gr.themes.Soft(),
|
66 |
+
concurrency_limit=20,
|
67 |
+
).launch(show_api=False)
|