Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
print(">>> BOOT [1/9] importing gradio...", flush=True)
|
| 2 |
import gradio as gr
|
| 3 |
print(">>> BOOT [2/9] importing gradio_chessboard...", flush=True)
|
|
|
|
| 1 |
+
# --- COGNITIVE SHIM: SENSORY AUDIO INITIALIZATION ---
|
| 2 |
+
# Python 3.13 removed 'audioop'. We must shim it before Gradio or Pydub are loaded.
|
| 3 |
+
try:
|
| 4 |
+
import audioop
|
| 5 |
+
except ImportError:
|
| 6 |
+
try:
|
| 7 |
+
from audioop_lts import audioop
|
| 8 |
+
import sys
|
| 9 |
+
sys.modules['audioop'] = audioop
|
| 10 |
+
print(">>> Sensory Shim: 'audioop' successfully restored via audioop-lts.", flush=True)
|
| 11 |
+
except ImportError:
|
| 12 |
+
print(">>> Sensory Shim: WARNING - Could not find audioop-lts. Audio processing may fail.", flush=True)
|
| 13 |
+
# ---------------------------------------------------
|
| 14 |
+
|
| 15 |
print(">>> BOOT [1/9] importing gradio...", flush=True)
|
| 16 |
import gradio as gr
|
| 17 |
print(">>> BOOT [2/9] importing gradio_chessboard...", flush=True)
|