Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ from transformers import (
|
|
7 |
pipeline
|
8 |
)
|
9 |
|
10 |
-
from Levenshtein import distance as levenshtein_distance
|
11 |
|
12 |
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
13 |
|
@@ -69,7 +69,7 @@ def transcribe_audio(audio_path):
|
|
69 |
"repetition_penalty": 1.2
|
70 |
}
|
71 |
)
|
72 |
-
return result
|
73 |
except Exception as e:
|
74 |
print(f"Error during transcription: {e}")
|
75 |
return None
|
|
|
7 |
pipeline
|
8 |
)
|
9 |
|
10 |
+
#from Levenshtein import distance as levenshtein_distance
|
11 |
|
12 |
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
13 |
|
|
|
69 |
"repetition_penalty": 1.2
|
70 |
}
|
71 |
)
|
72 |
+
return result["text"]
|
73 |
except Exception as e:
|
74 |
print(f"Error during transcription: {e}")
|
75 |
return None
|