Update app.py
Browse files
app.py
CHANGED
|
@@ -12,6 +12,12 @@ import json
|
|
| 12 |
import os
|
| 13 |
import time
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
import gradio as gr
|
| 16 |
import numpy as np
|
| 17 |
import onnxruntime as ort
|
|
|
|
| 12 |
import os
|
| 13 |
import time
|
| 14 |
|
| 15 |
+
# HF's Gradio-Space image sets GRADIO_SSR_MODE=true, which spawns a second
|
| 16 |
+
# (Node SSR) server on port 7861. Under the mount_gradio_app + uvicorn pattern
|
| 17 |
+
# it double-binds and crashes the Space ("[Errno 98] address already in use" on
|
| 18 |
+
# 7861). Force it off BEFORE gradio is imported.
|
| 19 |
+
os.environ["GRADIO_SSR_MODE"] = "false"
|
| 20 |
+
|
| 21 |
import gradio as gr
|
| 22 |
import numpy as np
|
| 23 |
import onnxruntime as ort
|