Spaces:
Sleeping
Sleeping
Keep main process alive after launch
Browse files
app.py
CHANGED
|
@@ -320,4 +320,12 @@ with gr.Blocks(title="UniversalFakeDetect - Single Image Analysis") as demo:
|
|
| 320 |
)
|
| 321 |
|
| 322 |
if __name__ == "__main__":
|
| 323 |
-
demo.launch(ssr_mode=False, css=custom_css)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 320 |
)
|
| 321 |
|
| 322 |
if __name__ == "__main__":
|
| 323 |
+
demo.launch(server_name="0.0.0.0", server_port=7860, ssr_mode=False, css=custom_css)
|
| 324 |
+
try:
|
| 325 |
+
demo.block_till_done()
|
| 326 |
+
except (KeyboardInterrupt, SystemExit):
|
| 327 |
+
pass
|
| 328 |
+
except Exception as e:
|
| 329 |
+
print(f"[UniversalFakeDetect] Keep-alive notice: {e}")
|
| 330 |
+
while True:
|
| 331 |
+
time.sleep(3600)
|