Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,7 @@ def generate(prompt, chat_history, max_new_tokens):
|
|
35 |
final_prompt += "Output:"
|
36 |
|
37 |
# Streamer
|
38 |
-
streamer = TextIteratorStreamer(tokenizer=tokenizer, skip_prompt=True)
|
39 |
thread = Thread(target=phi2, kwargs={"text_inputs":final_prompt, "max_new_tokens":max_new_tokens, "streamer":streamer})
|
40 |
thread.start()
|
41 |
|
|
|
35 |
final_prompt += "Output:"
|
36 |
|
37 |
# Streamer
|
38 |
+
streamer = TextIteratorStreamer(tokenizer=tokenizer, skip_prompt=True, skip_special_tokens=True, timeout=300.0)
|
39 |
thread = Thread(target=phi2, kwargs={"text_inputs":final_prompt, "max_new_tokens":max_new_tokens, "streamer":streamer})
|
40 |
thread.start()
|
41 |
|