Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
ec6c41e
1
Parent(s):
9cc0a3d
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ def transcribe(audio: tuple[int, np.ndarray], transformers_convo: list[dict], gr
|
|
66 |
sr=processor.feature_extractor.sampling_rate)[0]
|
67 |
)
|
68 |
inputs = processor(text=text, audios=audios, return_tensors="pt", padding=True)
|
69 |
-
inputs.input_ids = inputs.input_ids.to("cuda")
|
70 |
|
71 |
generate_ids = model.generate(**inputs, max_length=256)
|
72 |
generate_ids = generate_ids[:, inputs.input_ids.size(1):]
|
|
|
66 |
sr=processor.feature_extractor.sampling_rate)[0]
|
67 |
)
|
68 |
inputs = processor(text=text, audios=audios, return_tensors="pt", padding=True)
|
69 |
+
inputs.input_ids = inputs.input_ids.to("cuda:0")
|
70 |
|
71 |
generate_ids = model.generate(**inputs, max_length=256)
|
72 |
generate_ids = generate_ids[:, inputs.input_ids.size(1):]
|