Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ def translate(audio, text, source_lang, target_lang, auto_detect):
|
|
| 15 |
|
| 16 |
if audio is not None and not text.strip():
|
| 17 |
wav, sr = audio
|
| 18 |
-
inputs = processor(wav, sampling_rate=sr, src_lang=src, return_tensors="pt")
|
| 19 |
else:
|
| 20 |
inputs = processor(text=text, src_lang=src, return_tensors="pt")
|
| 21 |
|
|
|
|
| 15 |
|
| 16 |
if audio is not None and not text.strip():
|
| 17 |
wav, sr = audio
|
| 18 |
+
inputs = processor(audios=wav, sampling_rate=sr, src_lang=src, return_tensors="pt")
|
| 19 |
else:
|
| 20 |
inputs = processor(text=text, src_lang=src, return_tensors="pt")
|
| 21 |
|