Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -86,13 +86,13 @@ def prompt_engg(message, chain_history, index, previous_index="Broken Images"):
|
|
86 |
|
87 |
def respond(message, chain_history, ui_history, index):
|
88 |
|
|
|
89 |
message=prompt_engg(message, chain_history, index)
|
90 |
response_text, updated_history = gradio_chat(message, chain_history, index=index)
|
91 |
|
92 |
if ui_history is None:
|
93 |
ui_history = []
|
94 |
|
95 |
-
ui_history.append({"role": "user", "content": message})
|
96 |
ui_history.append({"role": "assistant", "content": response_text})
|
97 |
#print(ui_history)
|
98 |
return "", updated_history, ui_history
|
|
|
86 |
|
87 |
def respond(message, chain_history, ui_history, index):
|
88 |
|
89 |
+
ui_history.append({"role": "user", "content": message})
|
90 |
message=prompt_engg(message, chain_history, index)
|
91 |
response_text, updated_history = gradio_chat(message, chain_history, index=index)
|
92 |
|
93 |
if ui_history is None:
|
94 |
ui_history = []
|
95 |
|
|
|
96 |
ui_history.append({"role": "assistant", "content": response_text})
|
97 |
#print(ui_history)
|
98 |
return "", updated_history, ui_history
|