Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
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(
|