lobrien001 commited on
Commit
f916985
·
verified ·
1 Parent(s): fcff8b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -18,6 +18,9 @@ REQUEST_LATENCY = Histogram('gradio_request_latency_seconds', 'Request latency i
18
  # --- Logging Setup ---
19
  logging.basicConfig(filename="chat_log.txt", level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
20
 
 
 
 
21
  # --- Chat Function with Monitoring ---
22
  def chat_function(message, history):
23
  with REQUEST_LATENCY.time():
@@ -109,3 +112,4 @@ demo.launch(share=True)
109
 
110
 
111
 
 
 
18
  # --- Logging Setup ---
19
  logging.basicConfig(filename="chat_log.txt", level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
20
 
21
+ # --- Queue and Metrics ---
22
+ chat_queue = Queue() # Define chat_queue globally
23
+
24
  # --- Chat Function with Monitoring ---
25
  def chat_function(message, history):
26
  with REQUEST_LATENCY.time():
 
112
 
113
 
114
 
115
+