hsuwill000 commited on
Commit
885df1a
·
verified ·
1 Parent(s): 5adf214

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -43,7 +43,7 @@ def generate_stream(prompt):
43
  def worker():
44
  # 在背景 thread 中做推論
45
  nonlocal tps_result
46
- gen_result = pipe.generate([prompt], streamer=streamer, config)
47
  tps = gen_result.perf_metrics.get_throughput().mean
48
  tps_result = f"{tps:.2f} tokens/s"
49
  q.put(None) # 結束符號
 
43
  def worker():
44
  # 在背景 thread 中做推論
45
  nonlocal tps_result
46
+ gen_result = pipe.generate([prompt], streamer=streamer, config=config)
47
  tps = gen_result.perf_metrics.get_throughput().mean
48
  tps_result = f"{tps:.2f} tokens/s"
49
  q.put(None) # 結束符號