jefffffff9 commited on
Commit
65942ec
·
1 Parent(s): 76db545

Fix: upgrade to Gradio 5 (HfFolder removed from huggingface-hub 1.x)

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +4 -2
  3. requirements.txt +2 -2
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🌾
4
  colorFrom: green
5
  colorTo: yellow
6
  sdk: gradio
7
- sdk_version: "4.44.0"
8
  app_file: app.py
9
  hardware: cpu-basic
10
  pinned: false
 
4
  colorFrom: green
5
  colorTo: yellow
6
  sdk: gradio
7
+ sdk_version: "5.9.1"
8
  app_file: app.py
9
  hardware: cpu-basic
10
  pinned: false
app.py CHANGED
@@ -435,11 +435,13 @@ def build_ui() -> gr.Blocks:
435
  )
436
 
437
  model_status_box = gr.Textbox(
438
- value=get_model_status,
439
  label="Model status",
440
  interactive=False,
441
- every=3,
442
  )
 
 
 
443
 
444
  with gr.Tabs():
445
 
 
435
  )
436
 
437
  model_status_box = gr.Textbox(
438
+ value=get_model_status(),
439
  label="Model status",
440
  interactive=False,
 
441
  )
442
+ # gr.Timer polls get_model_status every 3s and updates the box (Gradio 5)
443
+ status_timer = gr.Timer(value=3)
444
+ status_timer.tick(fn=get_model_status, outputs=model_status_box)
445
 
446
  with gr.Tabs():
447
 
requirements.txt CHANGED
@@ -35,8 +35,8 @@ jiwer==3.0.4
35
  pyyaml==6.0.2
36
  python-dotenv==1.1.0
37
 
38
- # Gradio (must match sdk_version in README.md)
39
- gradio==4.44.0
40
 
41
  # Pydantic v2
42
  pydantic==2.11.3
 
35
  pyyaml==6.0.2
36
  python-dotenv==1.1.0
37
 
38
+ # Gradio version is controlled by sdk_version in README.md — do not pin here
39
+ # to avoid conflict with the version HF Spaces pre-installs.
40
 
41
  # Pydantic v2
42
  pydantic==2.11.3