Update app.py
Browse files
app.py
CHANGED
@@ -732,10 +732,11 @@ def chat(user_input, history=[]):
|
|
732 |
response = advanced_text_generation(input_vector)
|
733 |
|
734 |
# Update the history with the new user input and response
|
735 |
-
history.append(
|
736 |
-
history.append(
|
737 |
|
738 |
-
return
|
|
|
739 |
|
740 |
|
741 |
demo = gr.ChatInterface(
|
|
|
732 |
response = advanced_text_generation(input_vector)
|
733 |
|
734 |
# Update the history with the new user input and response
|
735 |
+
history.append({"role": "user", "message": user_input}) # Store user input
|
736 |
+
history.append({"role": "assistant", "message": response}) # Store model response
|
737 |
|
738 |
+
return history # Return the updated history as a list of message dictionaries
|
739 |
+
|
740 |
|
741 |
|
742 |
demo = gr.ChatInterface(
|