Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -93,11 +93,11 @@ def generate(prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition
|
|
93 |
output = prompt
|
94 |
|
95 |
for response in stream:
|
96 |
-
|
|
|
|
|
|
|
97 |
yield output
|
98 |
-
|
99 |
-
if fim_mode:
|
100 |
-
output += suffix
|
101 |
return output
|
102 |
|
103 |
|
|
|
93 |
output = prompt
|
94 |
|
95 |
for response in stream:
|
96 |
+
if fim_mode and response.token.text =="<|endoftext|>":
|
97 |
+
output += (suffix + response.token.text)
|
98 |
+
else:
|
99 |
+
output += response.token.text
|
100 |
yield output
|
|
|
|
|
|
|
101 |
return output
|
102 |
|
103 |
|