Spaces:
Running
Running
Jiawei Dong commited on
Commit 路
c86fbed
1
Parent(s): 9a40f1b
eng updated
Browse files- .gitignore +7 -0
- app.py +5 -3
.gitignore
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
__pycache__/
|
| 2 |
+
*.py[cod]
|
| 3 |
+
.Python
|
| 4 |
+
.venv/
|
| 5 |
+
venv/
|
| 6 |
+
.env
|
| 7 |
+
.DS_Store
|
app.py
CHANGED
|
@@ -713,7 +713,7 @@ def build_ui() -> gr.Blocks:
|
|
| 713 |
"Patent translation 路 `connect.zhihuiya.com` / `hiro-translation-api`"
|
| 714 |
)
|
| 715 |
|
| 716 |
-
gateway_status = gr.HTML(value=check_service(
|
| 717 |
refresh_btn = gr.Button("Check gateway", size="sm", variant="secondary")
|
| 718 |
|
| 719 |
with gr.Row():
|
|
@@ -858,7 +858,9 @@ def build_ui() -> gr.Blocks:
|
|
| 858 |
|
| 859 |
|
| 860 |
demo = build_ui()
|
|
|
|
| 861 |
|
| 862 |
if __name__ == "__main__":
|
| 863 |
-
|
| 864 |
-
|
|
|
|
|
|
| 713 |
"Patent translation 路 `connect.zhihuiya.com` / `hiro-translation-api`"
|
| 714 |
)
|
| 715 |
|
| 716 |
+
gateway_status = gr.HTML(value=check_service())
|
| 717 |
refresh_btn = gr.Button("Check gateway", size="sm", variant="secondary")
|
| 718 |
|
| 719 |
with gr.Row():
|
|
|
|
| 858 |
|
| 859 |
|
| 860 |
demo = build_ui()
|
| 861 |
+
demo.queue(default_concurrency_limit=2)
|
| 862 |
|
| 863 |
if __name__ == "__main__":
|
| 864 |
+
# Spaces health-check needs 0.0.0.0; 127.0.0.1 works locally but leaves
|
| 865 |
+
# the Space stuck on Restarting/Starting.
|
| 866 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|