Spaces:
Runtime error
Runtime error
Commit
·
960ede5
1
Parent(s):
65b9ed7
adding Laama chat7b model
Browse files
app.py
CHANGED
|
@@ -54,8 +54,9 @@ def process_documents(documents,data_chunk=1500,chunk_overlap=100):
|
|
| 54 |
|
| 55 |
def audio_processor(wav_file,API_key,wav_model='small',llm='HuggingFace',temperature=0.1,max_tokens=4096):
|
| 56 |
device='cpu'
|
| 57 |
-
logger.info("
|
| 58 |
whisper = whisper_app.WHISPERModel(model_name=wav_model,device=device)
|
|
|
|
| 59 |
text_info = whisper.speech_to_text(audio_path=wav_file)
|
| 60 |
|
| 61 |
metadata = {"source": f"{wav_file}","duration":text_info['duration'],"language":text_info['language']}
|
|
|
|
| 54 |
|
| 55 |
def audio_processor(wav_file,API_key,wav_model='small',llm='HuggingFace',temperature=0.1,max_tokens=4096):
|
| 56 |
device='cpu'
|
| 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']}
|