Spaces:
Sleeping
Sleeping
Commit ·
69bf17c
1
Parent(s): 9d8cafd
requirmeents update
Browse files
app.py
CHANGED
|
@@ -143,7 +143,7 @@ def _busy_wrapper(*args):
|
|
| 143 |
raise gr.Error(f"Something went wrong: {exc}")
|
| 144 |
|
| 145 |
|
| 146 |
-
with gr.Blocks(title="Togyzkumalak Scoresheet Reader"
|
| 147 |
gr.Markdown(
|
| 148 |
"# Togyzkumalak Scoresheet Reader\n"
|
| 149 |
"Upload up to **5** scoresheet photos, optionally tag each game's known "
|
|
@@ -180,7 +180,8 @@ with gr.Blocks(title="Togyzkumalak Scoresheet Reader", api_open=False) as demo:
|
|
| 180 |
|
| 181 |
# Serialize CPU-heavy runs: callers wait in a bounded queue instead of
|
| 182 |
# overloading the shared Space (which is what triggers 429s).
|
| 183 |
-
|
|
|
|
| 184 |
|
| 185 |
if __name__ == "__main__":
|
| 186 |
# Bind explicitly to 0.0.0.0 and the Space's port so HF can detect the
|
|
|
|
| 143 |
raise gr.Error(f"Something went wrong: {exc}")
|
| 144 |
|
| 145 |
|
| 146 |
+
with gr.Blocks(title="Togyzkumalak Scoresheet Reader") as demo:
|
| 147 |
gr.Markdown(
|
| 148 |
"# Togyzkumalak Scoresheet Reader\n"
|
| 149 |
"Upload up to **5** scoresheet photos, optionally tag each game's known "
|
|
|
|
| 180 |
|
| 181 |
# Serialize CPU-heavy runs: callers wait in a bounded queue instead of
|
| 182 |
# overloading the shared Space (which is what triggers 429s).
|
| 183 |
+
# api_open=False prevents standard HTTP calls from skipping the queue.
|
| 184 |
+
demo.queue(max_size=16, default_concurrency_limit=1, api_open=False)
|
| 185 |
|
| 186 |
if __name__ == "__main__":
|
| 187 |
# Bind explicitly to 0.0.0.0 and the Space's port so HF can detect the
|