Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -130,8 +130,7 @@ def chat(user_message, history):
|
|
| 130 |
if history is None:
|
| 131 |
history = []
|
| 132 |
|
| 133 |
-
|
| 134 |
-
history.append({"role": "assistant", "content": response})
|
| 135 |
|
| 136 |
return history, history
|
| 137 |
|
|
@@ -146,7 +145,7 @@ with gr.Blocks() as app:
|
|
| 146 |
file = gr.File(label="Upload PDF")
|
| 147 |
status = gr.Textbox(label="Status")
|
| 148 |
|
| 149 |
-
chatbot = gr.Chatbot(
|
| 150 |
msg = gr.Textbox(placeholder="Ask your question...")
|
| 151 |
state = gr.State([])
|
| 152 |
|
|
|
|
| 130 |
if history is None:
|
| 131 |
history = []
|
| 132 |
|
| 133 |
+
history.append((user_message, response))
|
|
|
|
| 134 |
|
| 135 |
return history, history
|
| 136 |
|
|
|
|
| 145 |
file = gr.File(label="Upload PDF")
|
| 146 |
status = gr.Textbox(label="Status")
|
| 147 |
|
| 148 |
+
chatbot = gr.Chatbot() # IMPORTANT FIX
|
| 149 |
msg = gr.Textbox(placeholder="Ask your question...")
|
| 150 |
state = gr.State([])
|
| 151 |
|