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