Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def generate_stream(prompt):
|
|
41 |
def worker():
|
42 |
# ε¨θζ― thread δΈεζ¨θ«
|
43 |
nonlocal tps_result
|
44 |
-
gen_result = pipe.generate([prompt], streamer=streamer, max_new_tokens=
|
45 |
tps = gen_result.perf_metrics.get_throughput().mean
|
46 |
tps_result = f"{tps:.2f} tokens/s"
|
47 |
q.put(None) # η΅ζ符θ
|
@@ -70,7 +70,7 @@ with gr.Blocks(css="""
|
|
70 |
with gr.Row():
|
71 |
start_btn = gr.Button("ιε§ε°θ©±")
|
72 |
end_btn = gr.Button("η΅ζε°θ©±")
|
73 |
-
status_box = gr.Textbox(label="ηζ
",
|
74 |
TPS_box = gr.Textbox(label="TPS", interactive=False)
|
75 |
|
76 |
start_btn.click(fn=start_chat, outputs=status_box)
|
|
|
41 |
def worker():
|
42 |
# ε¨θζ― thread δΈεζ¨θ«
|
43 |
nonlocal tps_result
|
44 |
+
gen_result = pipe.generate([prompt], streamer=streamer, max_new_tokens=1024)
|
45 |
tps = gen_result.perf_metrics.get_throughput().mean
|
46 |
tps_result = f"{tps:.2f} tokens/s"
|
47 |
q.put(None) # η΅ζ符θ
|
|
|
70 |
with gr.Row():
|
71 |
start_btn = gr.Button("ιε§ε°θ©±")
|
72 |
end_btn = gr.Button("η΅ζε°θ©±")
|
73 |
+
status_box = gr.Textbox(label="ηζ
", interactive=False)
|
74 |
TPS_box = gr.Textbox(label="TPS", interactive=False)
|
75 |
|
76 |
start_btn.click(fn=start_chat, outputs=status_box)
|