jiandan1998 commited on
Commit
20a91f5
·
verified ·
1 Parent(s): a4c117a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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'] >= 20:
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=4).launch(
340
  server_name="0.0.0.0",
341
- max_threads=16,
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
  )