Spaces:
Runtime error
Runtime error
Commit
·
85c7303
1
Parent(s):
ac4a6e0
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,8 @@ import gradio as gr
|
|
4 |
|
5 |
|
6 |
def get_text(audio_path):
|
|
|
|
|
7 |
model = whisper.load_model(name='base', download_root=config.MODEL_DIR)
|
8 |
results = model.transcribe(audio_path)
|
9 |
return results['text']
|
|
|
4 |
|
5 |
|
6 |
def get_text(audio_path):
|
7 |
+
if not audio_path:
|
8 |
+
return "No audio file chosen..."
|
9 |
model = whisper.load_model(name='base', download_root=config.MODEL_DIR)
|
10 |
results = model.transcribe(audio_path)
|
11 |
return results['text']
|