Spaces:
Runtime error
Runtime error
Update fn.py
Browse files
fn.py
CHANGED
@@ -42,7 +42,7 @@ def speech_to_text(audio_file, _model_size = None):
|
|
42 |
# run inference
|
43 |
generate_kwargs = {}
|
44 |
if initial_prompt:
|
45 |
-
generate_kwargs['prompt_ids'] = pipe.tokenizer.get_prompt_ids(
|
46 |
result = pipe(audio_file, generate_kwargs=generate_kwargs)
|
47 |
|
48 |
try:
|
|
|
42 |
# run inference
|
43 |
generate_kwargs = {}
|
44 |
if initial_prompt:
|
45 |
+
generate_kwargs['prompt_ids'] = pipe.tokenizer.get_prompt_ids(initial_prompt, return_tensors="pt").to(device)
|
46 |
result = pipe(audio_file, generate_kwargs=generate_kwargs)
|
47 |
|
48 |
try:
|