Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,7 +21,10 @@ def model_inference(
|
|
| 21 |
input_dict, history, decoding_strategy, temperature, max_new_tokens,
|
| 22 |
repetition_penalty, top_p, progress=gr.Progress(track_tqdm=True)
|
| 23 |
):
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
| 25 |
t0 = time.perf_counter()
|
| 26 |
text = input_dict["text"]
|
| 27 |
print(input_dict["files"])
|
|
@@ -79,8 +82,6 @@ def model_inference(
|
|
| 79 |
thread.start()
|
| 80 |
thread.join()
|
| 81 |
|
| 82 |
-
buffer = ""
|
| 83 |
-
|
| 84 |
|
| 85 |
for new_text in streamer:
|
| 86 |
|
|
|
|
| 21 |
input_dict, history, decoding_strategy, temperature, max_new_tokens,
|
| 22 |
repetition_penalty, top_p, progress=gr.Progress(track_tqdm=True)
|
| 23 |
):
|
| 24 |
+
buffer = "Thinking... "
|
| 25 |
+
|
| 26 |
+
yield buffer
|
| 27 |
+
|
| 28 |
t0 = time.perf_counter()
|
| 29 |
text = input_dict["text"]
|
| 30 |
print(input_dict["files"])
|
|
|
|
| 82 |
thread.start()
|
| 83 |
thread.join()
|
| 84 |
|
|
|
|
|
|
|
| 85 |
|
| 86 |
for new_text in streamer:
|
| 87 |
|