Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ def generate_response(transcription):
|
|
49 |
{"role": "user", "content": transcription},
|
50 |
]
|
51 |
tokenized_chat = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
|
52 |
-
input_ids = tokenized_chat[0].to('
|
53 |
if len(input_ids.shape) == 1:
|
54 |
input_ids = input_ids.unsqueeze(0)
|
55 |
with torch.no_grad():
|
|
|
49 |
{"role": "user", "content": transcription},
|
50 |
]
|
51 |
tokenized_chat = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
|
52 |
+
input_ids = tokenized_chat[0].to('device')
|
53 |
if len(input_ids.shape) == 1:
|
54 |
input_ids = input_ids.unsqueeze(0)
|
55 |
with torch.no_grad():
|