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 |
final_prompt = f"{system_llava}\n{prompt}"
|
268 |
|
269 |
-
inputs = processor(
|
270 |
streamer = TextIteratorStreamer(processor, skip_prompt=True, **{"skip_special_tokens": True})
|
271 |
generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=2048)
|
272 |
generated_text = ""
|
|
|
266 |
|
267 |
final_prompt = f"{system_llava}\n{prompt}"
|
268 |
|
269 |
+
inputs = processor(final_prompt, image, return_tensors="pt").to("cuda", torch.float16)
|
270 |
streamer = TextIteratorStreamer(processor, skip_prompt=True, **{"skip_special_tokens": True})
|
271 |
generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=2048)
|
272 |
generated_text = ""
|