Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -98,7 +98,7 @@ def model_inference(input_dict, history):
|
|
| 98 |
return_tensors="pt",
|
| 99 |
padding=True,
|
| 100 |
).to("cuda")
|
| 101 |
-
streamer = TextIteratorStreamer(processor, skip_prompt=True, skip_special_tokens=
|
| 102 |
generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=4096)
|
| 103 |
thread = Thread(target=model.generate, kwargs=generation_kwargs)
|
| 104 |
thread.start()
|
|
|
|
| 98 |
return_tensors="pt",
|
| 99 |
padding=True,
|
| 100 |
).to("cuda")
|
| 101 |
+
streamer = TextIteratorStreamer(processor, skip_prompt=True, skip_special_tokens=True)
|
| 102 |
generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=4096)
|
| 103 |
thread = Thread(target=model.generate, kwargs=generation_kwargs)
|
| 104 |
thread.start()
|