Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
2b92c5c
1
Parent(s):
ec6c41e
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,8 @@ 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
|
|
|
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 = dict(**inputs)
|
70 |
+
inputs["input_ids"] = inputs["input_ids"].to("cuda:0")
|
71 |
|
72 |
generate_ids = model.generate(**inputs, max_length=256)
|
73 |
generate_ids = generate_ids[:, inputs.input_ids.size(1):]
|