Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- app.py +3 -2
- requirements.txt +1 -2
app.py
CHANGED
|
@@ -77,9 +77,10 @@ def respond(query: str, history: list):
|
|
| 77 |
if chart_data:
|
| 78 |
chart_image = create_chart(chart_data)
|
| 79 |
|
| 80 |
-
# Update history (Gradio
|
| 81 |
history = history or []
|
| 82 |
-
history.append(
|
|
|
|
| 83 |
|
| 84 |
return history, chart_image
|
| 85 |
|
|
|
|
| 77 |
if chart_data:
|
| 78 |
chart_image = create_chart(chart_data)
|
| 79 |
|
| 80 |
+
# Update history (Gradio 5.x messages format)
|
| 81 |
history = history or []
|
| 82 |
+
history.append({"role": "user", "content": query})
|
| 83 |
+
history.append({"role": "assistant", "content": response})
|
| 84 |
|
| 85 |
return history, chart_image
|
| 86 |
|
requirements.txt
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
-
gradio>=
|
| 2 |
huggingface-hub==0.23.0
|
| 3 |
matplotlib>=3.8.0
|
| 4 |
numpy>=1.24.0
|
| 5 |
Pillow>=10.0.0
|
| 6 |
pydantic>=2.0.0
|
| 7 |
-
pyaudioop>=0.0.1
|
|
|
|
| 1 |
+
gradio>=5.0.0
|
| 2 |
huggingface-hub==0.23.0
|
| 3 |
matplotlib>=3.8.0
|
| 4 |
numpy>=1.24.0
|
| 5 |
Pillow>=10.0.0
|
| 6 |
pydantic>=2.0.0
|
|
|