Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -73,15 +73,14 @@ def predict(message, history):
|
|
73 |
yield partial_message
|
74 |
|
75 |
# Adjust the Gradio interface for a chatbot
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
84 + ).queue()
|
85 |
|
86 |
if __name__ == "__main__":
|
87 |
demo.launch()
|
|
|
73 |
yield partial_message
|
74 |
|
75 |
# Adjust the Gradio interface for a chatbot
|
76 |
+
demo = gr.Interface(
|
77 |
+
fn=predict,
|
78 |
+
inputs=[
|
79 |
+
gr.Textbox(label="Message", placeholder="Enter your message"),
|
80 |
+
gr.State(label="Conversation History") # State is used to manage history
|
81 |
+
],
|
82 |
+
outputs=gr.Textbox(label="Response"),
|
83 |
+
live=True).queue()
|
|
|
84 |
|
85 |
if __name__ == "__main__":
|
86 |
demo.launch()
|