eswardivi commited on
Commit
e9cb74c
1 Parent(s): e2534da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -33,7 +33,7 @@ else:
33
  # Dispatch Errors
34
 
35
 
36
- @spaces.GPU
37
  def chat(message, history, temperature, top_p, top_k, max_tokens):
38
  start_time = time.time()
39
  chat = []
@@ -72,8 +72,7 @@ def chat(message, history, temperature, top_p, top_k, max_tokens):
72
  tokens_per_second = tokens / total_time if total_time > 0 else 0
73
 
74
  timing_info = f"\n\nTime taken to first token: {first_token_time:.2f} seconds\nTokens per second: {tokens_per_second:.2f}"
75
- gr.Info(timing_info)
76
- yield partial_text
77
 
78
 
79
  demo = gr.ChatInterface(
 
33
  # Dispatch Errors
34
 
35
 
36
+ @spaces.GPU(duration=150)
37
  def chat(message, history, temperature, top_p, top_k, max_tokens):
38
  start_time = time.time()
39
  chat = []
 
72
  tokens_per_second = tokens / total_time if total_time > 0 else 0
73
 
74
  timing_info = f"\n\nTime taken to first token: {first_token_time:.2f} seconds\nTokens per second: {tokens_per_second:.2f}"
75
+ yield partial_text + timing_info
 
76
 
77
 
78
  demo = gr.ChatInterface(