TurkishCodeMan commited on
Commit
c44b3ac
·
verified ·
1 Parent(s): edaaf7b

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. app.py +3 -2
  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 4.x tuple format)
81
  history = history or []
82
- history.append((query, response))
 
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>=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
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