disLodge commited on
Commit
a87b35b
·
verified ·
1 Parent(s): ae47fec
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -80,6 +80,8 @@ after_rag_chain = (
80
  def process_query(role, system_message, max_tokens, temperature, top_p):
81
 
82
  global last_call_time
 
 
83
  if current_time - last_call_time < 60:
84
  wait_time = int(60 - (current_time - last_call_time))
85
  return f"Rate limit exceeded. Please wait {wait_time} seconds before trying again."
 
80
  def process_query(role, system_message, max_tokens, temperature, top_p):
81
 
82
  global last_call_time
83
+ current_time = time.time()
84
+
85
  if current_time - last_call_time < 60:
86
  wait_time = int(60 - (current_time - last_call_time))
87
  return f"Rate limit exceeded. Please wait {wait_time} seconds before trying again."