Spaces:
Running
on
Zero
Running
on
Zero
Update chatbot.py
Browse files- chatbot.py +1 -1
chatbot.py
CHANGED
@@ -266,7 +266,7 @@ def model_inference( user_prompt, chat_history, web_search):
|
|
266 |
|
267 |
inputs = processor(prompt, image, return_tensors="pt").to("cuda", torch.float16)
|
268 |
streamer = TextIteratorStreamer(processor, **{"skip_special_tokens": True})
|
269 |
-
generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=1024
|
270 |
generated_text = ""
|
271 |
|
272 |
thread = Thread(target=model.generate, kwargs=generation_kwargs)
|
|
|
266 |
|
267 |
inputs = processor(prompt, image, return_tensors="pt").to("cuda", torch.float16)
|
268 |
streamer = TextIteratorStreamer(processor, **{"skip_special_tokens": True})
|
269 |
+
generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=1024)
|
270 |
generated_text = ""
|
271 |
|
272 |
thread = Thread(target=model.generate, kwargs=generation_kwargs)
|