Spaces:
Running
Running
Remove demo.load callback, disable SSR - fix startup timeout
Browse files- __pycache__/app.cpython-313.pyc +0 -0
- app.py +1 -8
__pycache__/app.cpython-313.pyc
ADDED
|
Binary file (19.8 kB). View file
|
|
|
app.py
CHANGED
|
@@ -394,11 +394,6 @@ def detect_url(url: str) -> tuple[dict, str, str]:
|
|
| 394 |
return result, preview, share_link
|
| 395 |
|
| 396 |
|
| 397 |
-
def handle_url_param(request: gr.Request):
|
| 398 |
-
"""Auto-fill URL from ?url= query parameter."""
|
| 399 |
-
url = request.query_params.get("url", "")
|
| 400 |
-
return url if url else ""
|
| 401 |
-
|
| 402 |
|
| 403 |
with gr.Blocks(css=CSS, title="AI Text Detector", theme=gr.themes.Base()) as demo:
|
| 404 |
|
|
@@ -485,8 +480,6 @@ with gr.Blocks(css=CSS, title="AI Text Detector", theme=gr.themes.Base()) as dem
|
|
| 485 |
label="",
|
| 486 |
)
|
| 487 |
|
| 488 |
-
# Auto-fill URL from ?url= query parameter on page load
|
| 489 |
-
demo.load(fn=handle_url_param, inputs=None, outputs=url_input)
|
| 490 |
|
| 491 |
gr.HTML("""
|
| 492 |
<div class="info-strip">
|
|
@@ -501,4 +494,4 @@ with gr.Blocks(css=CSS, title="AI Text Detector", theme=gr.themes.Base()) as dem
|
|
| 501 |
""")
|
| 502 |
|
| 503 |
if __name__ == "__main__":
|
| 504 |
-
demo.launch(share=False)
|
|
|
|
| 394 |
return result, preview, share_link
|
| 395 |
|
| 396 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 397 |
|
| 398 |
with gr.Blocks(css=CSS, title="AI Text Detector", theme=gr.themes.Base()) as demo:
|
| 399 |
|
|
|
|
| 480 |
label="",
|
| 481 |
)
|
| 482 |
|
|
|
|
|
|
|
| 483 |
|
| 484 |
gr.HTML("""
|
| 485 |
<div class="info-strip">
|
|
|
|
| 494 |
""")
|
| 495 |
|
| 496 |
if __name__ == "__main__":
|
| 497 |
+
demo.launch(share=False, ssr_mode=False)
|