Update app.py
Browse files
app.py
CHANGED
|
@@ -68,7 +68,7 @@ class RateLimiter:
|
|
| 68 |
self.clients[client_id] = {'count': 1, 'reset': now + 3600}
|
| 69 |
return True
|
| 70 |
|
| 71 |
-
if self.clients[client_id]['count'] >=
|
| 72 |
return False
|
| 73 |
|
| 74 |
self.clients[client_id]['count'] += 1
|
|
@@ -336,8 +336,8 @@ with gr.Blocks(
|
|
| 336 |
|
| 337 |
if __name__ == "__main__":
|
| 338 |
threading.Thread(target=cleanup_task, daemon=True).start()
|
| 339 |
-
app.queue(max_size=
|
| 340 |
server_name="0.0.0.0",
|
| 341 |
-
max_threads=
|
| 342 |
share=False
|
| 343 |
)
|
|
|
|
| 68 |
self.clients[client_id] = {'count': 1, 'reset': now + 3600}
|
| 69 |
return True
|
| 70 |
|
| 71 |
+
if self.clients[client_id]['count'] >= 8:
|
| 72 |
return False
|
| 73 |
|
| 74 |
self.clients[client_id]['count'] += 1
|
|
|
|
| 336 |
|
| 337 |
if __name__ == "__main__":
|
| 338 |
threading.Thread(target=cleanup_task, daemon=True).start()
|
| 339 |
+
app.queue(max_size=2).launch(
|
| 340 |
server_name="0.0.0.0",
|
| 341 |
+
max_threads=4,
|
| 342 |
share=False
|
| 343 |
)
|