Spaces:
Runtime error
Runtime error
Commit
·
2144d43
1
Parent(s):
960ede5
adding Laama chat7b model
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ def audio_processor(wav_file,API_key,wav_model='small',llm='HuggingFace',tempera
|
|
57 |
logger.info("Audio File Name :",wav_file.name)
|
58 |
whisper = whisper_app.WHISPERModel(model_name=wav_model,device=device)
|
59 |
logger.info("Whisper Model Loaded || Model size:{}".format(wav_model))
|
60 |
-
text_info = whisper.speech_to_text(audio_path=wav_file)
|
61 |
|
62 |
metadata = {"source": f"{wav_file}","duration":text_info['duration'],"language":text_info['language']}
|
63 |
document = [Document(page_content=text_info['text'], metadata=metadata)]
|
|
|
57 |
logger.info("Audio File Name :",wav_file.name)
|
58 |
whisper = whisper_app.WHISPERModel(model_name=wav_model,device=device)
|
59 |
logger.info("Whisper Model Loaded || Model size:{}".format(wav_model))
|
60 |
+
text_info = whisper.speech_to_text(audio_path=wav_file.name)
|
61 |
|
62 |
metadata = {"source": f"{wav_file}","duration":text_info['duration'],"language":text_info['language']}
|
63 |
document = [Document(page_content=text_info['text'], metadata=metadata)]
|