Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -144,7 +144,7 @@ def model_inference(input_dict, history):
|
|
| 144 |
padding=True,
|
| 145 |
).to("cuda")
|
| 146 |
streamer = TextIteratorStreamer(processor, skip_prompt=True, skip_special_tokens=True)
|
| 147 |
-
generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=
|
| 148 |
thread = Thread(target=model.generate, kwargs=generation_kwargs)
|
| 149 |
thread.start()
|
| 150 |
buffer = ""
|
|
|
|
| 144 |
padding=True,
|
| 145 |
).to("cuda")
|
| 146 |
streamer = TextIteratorStreamer(processor, skip_prompt=True, skip_special_tokens=True)
|
| 147 |
+
generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=1024)
|
| 148 |
thread = Thread(target=model.generate, kwargs=generation_kwargs)
|
| 149 |
thread.start()
|
| 150 |
buffer = ""
|