Spaces:
Running
on
Zero
Running
on
Zero
da03
commited on
Commit
•
ad4fc9e
1
Parent(s):
dfd272f
app.py
CHANGED
@@ -82,8 +82,10 @@ def predict_product(num1, num2):
|
|
82 |
print (next_token_id)
|
83 |
|
84 |
if next_token_id.item() == tokenizer.eos_token_id:
|
85 |
-
|
86 |
-
|
|
|
|
|
87 |
past_key_values_per_model[model_name] = outputs.past_key_values
|
88 |
|
89 |
output_text = tokenizer.decode(generated_ids[0, input_len:], skip_special_tokens=True)
|
|
|
82 |
print (next_token_id)
|
83 |
|
84 |
if next_token_id.item() == tokenizer.eos_token_id:
|
85 |
+
finished_per_model[model_name] = True
|
86 |
+
continue
|
87 |
+
|
88 |
+
generated_ids_per_model[model_name] = generated_ids
|
89 |
past_key_values_per_model[model_name] = outputs.past_key_values
|
90 |
|
91 |
output_text = tokenizer.decode(generated_ids[0, input_len:], skip_special_tokens=True)
|