Spaces:
Paused
Paused
encryptd commited on
Commit ·
29918ac
1
Parent(s): d2f3bbf
prog update
Browse files
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 💬
|
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
hf_oauth: true
|
|
|
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 4.44.1
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
hf_oauth: true
|
app.py
CHANGED
|
@@ -116,12 +116,10 @@ with gr.Blocks(title="NuMarkdown API Server") as demo:
|
|
| 116 |
|
| 117 |
# --- STEP 4: SAFE MOUNTING ---
|
| 118 |
# We mount Gradio to a subpath to prevent it from fighting with the Root path and breaking CSS/JS.
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
#
|
| 122 |
-
|
| 123 |
-
def redirect_to_ui():
|
| 124 |
-
return RedirectResponse(url="/ui")
|
| 125 |
|
| 126 |
if __name__ == "__main__":
|
| 127 |
uvicorn.run(app, host="0.0.0.0", port=HF_PORT, workers=1)
|
|
|
|
| 116 |
|
| 117 |
# --- STEP 4: SAFE MOUNTING ---
|
| 118 |
# We mount Gradio to a subpath to prevent it from fighting with the Root path and breaking CSS/JS.
|
| 119 |
+
# Start Gradio's internal state
|
| 120 |
+
demo.queue()
|
| 121 |
+
# This creates the FastAPI instance Gradio uses
|
| 122 |
+
app = demo.app
|
|
|
|
|
|
|
| 123 |
|
| 124 |
if __name__ == "__main__":
|
| 125 |
uvicorn.run(app, host="0.0.0.0", port=HF_PORT, workers=1)
|