Spaces:
Runtime error
Runtime error
Haozhangcx
commited on
Commit
•
a3af4cd
1
Parent(s):
d676e1b
Update app.py
Browse files
app.py
CHANGED
@@ -176,6 +176,9 @@ def bot(history):
|
|
176 |
keywords = [stop_str]
|
177 |
stopping_criteria = KeywordsStoppingCriteria(keywords, our_chatbot.tokenizer, input_ids)
|
178 |
streamer = TextStreamer(our_chatbot.tokenizer, skip_prompt=True, skip_special_tokens=True)
|
|
|
|
|
|
|
179 |
# import pdb;pdb.set_trace()
|
180 |
with torch.inference_mode():
|
181 |
output_ids = our_chatbot.model.generate(input_ids, images=image_tensor, do_sample=True, temperature=0.2, max_new_tokens=1024, streamer=streamer, use_cache=False, stopping_criteria=[stopping_criteria])
|
|
|
176 |
keywords = [stop_str]
|
177 |
stopping_criteria = KeywordsStoppingCriteria(keywords, our_chatbot.tokenizer, input_ids)
|
178 |
streamer = TextStreamer(our_chatbot.tokenizer, skip_prompt=True, skip_special_tokens=True)
|
179 |
+
print(our_chatbot.model.device)
|
180 |
+
print(input_ids.device)
|
181 |
+
print(image_tensor.device)
|
182 |
# import pdb;pdb.set_trace()
|
183 |
with torch.inference_mode():
|
184 |
output_ids = our_chatbot.model.generate(input_ids, images=image_tensor, do_sample=True, temperature=0.2, max_new_tokens=1024, streamer=streamer, use_cache=False, stopping_criteria=[stopping_criteria])
|