MuhammadAdil63 commited on
Commit
a9692ee
Β·
1 Parent(s): b9d8575

fix: audioop shim in app.py for Python 3.13, remove gradio from requirements

Browse files
Files changed (2) hide show
  1. app.py +7 -0
  2. requirements.txt +1 -2
app.py CHANGED
@@ -17,6 +17,13 @@
17
  # ultralytics (for YOLOv8m-seg inference)
18
  # ─────────────────────────────────────────────────────────────────────────────
19
 
 
 
 
 
 
 
 
20
  import os
21
  import sys
22
  import json
 
17
  # ultralytics (for YOLOv8m-seg inference)
18
  # ─────────────────────────────────────────────────────────────────────────────
19
 
20
+ # ── Python 3.13 audioop shim (removed from stdlib, needed by pydub/gradio) ───
21
+ import sys, types
22
+ if "audioop" not in sys.modules:
23
+ sys.modules["audioop"] = types.ModuleType("audioop")
24
+ if "pyaudioop" not in sys.modules:
25
+ sys.modules["pyaudioop"] = types.ModuleType("pyaudioop")
26
+
27
  import os
28
  import sys
29
  import json
requirements.txt CHANGED
@@ -9,5 +9,4 @@ huggingface_hub>=0.26.0
9
  opencv-python-headless==4.9.0.80
10
  scikit-image==0.25.2
11
  scipy==1.15.3
12
- matplotlib>=3.9.0
13
- gradio>=5.0.0
 
9
  opencv-python-headless==4.9.0.80
10
  scikit-image==0.25.2
11
  scipy==1.15.3
12
+ matplotlib>=3.9.0