Spaces:
Sleeping
Sleeping
Fnu Mahnoor commited on
Commit ·
e26fd60
1
Parent(s): 8b2d877
Fix app
Browse files
app.py
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import numpy as np
|
| 3 |
import logging
|
|
@@ -137,7 +143,6 @@ if __name__ == "__main__":
|
|
| 137 |
demo.launch(
|
| 138 |
server_name="0.0.0.0",
|
| 139 |
server_port=7860,
|
| 140 |
-
share=True, # HF Spaces requirement
|
| 141 |
show_api=False, # UI only (schema still built internally)
|
| 142 |
max_threads=1, # ✅ Gradio 4–safe replacement
|
| 143 |
)
|
|
|
|
| 1 |
+
import gradio.routes
|
| 2 |
+
|
| 3 |
+
# 🔥 Hard-disable API schema generation (Gradio 4 bug workaround)
|
| 4 |
+
gradio.routes.api_info = lambda *args, **kwargs: {}
|
| 5 |
+
|
| 6 |
+
|
| 7 |
import gradio as gr
|
| 8 |
import numpy as np
|
| 9 |
import logging
|
|
|
|
| 143 |
demo.launch(
|
| 144 |
server_name="0.0.0.0",
|
| 145 |
server_port=7860,
|
|
|
|
| 146 |
show_api=False, # UI only (schema still built internally)
|
| 147 |
max_threads=1, # ✅ Gradio 4–safe replacement
|
| 148 |
)
|