munyew commited on
Commit
b44f4db
·
verified ·
1 Parent(s): e7f679b

fix: audioop stub for Python 3.13 / pydub compat

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -1,4 +1,13 @@
1
- import gradio as gr
 
 
 
 
 
 
 
 
 
2
  import requests
3
  import os
4
  import time
@@ -150,3 +159,4 @@ with gr.Blocks(title="Virtual Cloud Minimum", theme=gr.themes.Soft()) as demo:
150
 
151
  if __name__ == "__main__":
152
  demo.launch()
 
 
1
+ import sys
2
+ import types
3
+
4
+ # ── Python 3.13 compat: audioop removed; stub it so pydub/gradio can load ────
5
+ try:
6
+ import audioop # noqa: F401
7
+ except ModuleNotFoundError:
8
+ sys.modules["audioop"] = types.ModuleType("audioop")
9
+
10
+ import gradio as gr
11
  import requests
12
  import os
13
  import time
 
159
 
160
  if __name__ == "__main__":
161
  demo.launch()
162
+