Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -187,9 +187,26 @@ with gr.Blocks(title="ATS Resume Analyzer", theme=gr.themes.Soft()) as demo:
|
|
| 187 |
outputs=[json_output, raw_output, status]
|
| 188 |
)
|
| 189 |
|
| 190 |
-
#
|
|
|
|
| 191 |
if __name__ == "__main__":
|
| 192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
allowed_paths=["*"],
|
| 194 |
-
server_port=7860
|
|
|
|
| 195 |
)
|
|
|
|
| 187 |
outputs=[json_output, raw_output, status]
|
| 188 |
)
|
| 189 |
|
| 190 |
+
# ... (all your existing code remains the same until the launch part) ...
|
| 191 |
+
|
| 192 |
if __name__ == "__main__":
|
| 193 |
+
# Configure queue (choose one option):
|
| 194 |
+
|
| 195 |
+
# Option 1: Simple queue
|
| 196 |
+
demo.queue()
|
| 197 |
+
|
| 198 |
+
# Option 2: Limited concurrency
|
| 199 |
+
demo.queue(concurrency_count=3) # 3 concurrent processes
|
| 200 |
+
|
| 201 |
+
# Option 3: Limited queue size
|
| 202 |
+
demo.queue(max_size=5) # Max 5 requests in queue
|
| 203 |
+
|
| 204 |
+
# Option 4: Both limits
|
| 205 |
+
demo.queue(concurrency_count=3, max_size=10)
|
| 206 |
+
|
| 207 |
+
# Then launch
|
| 208 |
+
demo.launch(
|
| 209 |
allowed_paths=["*"],
|
| 210 |
+
server_port=7860,
|
| 211 |
+
share=True # Set to True if you want a public link
|
| 212 |
)
|