OthmaneLKH commited on
Commit
6c881fd
1 Parent(s): ad14853

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -19,6 +19,8 @@ from utils_demo import *
19
  from concrete.ml.deployment import FHEModelClient
20
  from models.speech_to_text import *
21
  from models.speech_to_text.transcriber.audio import preprocess_audio
 
 
22
 
23
  # Ensure the directory is clean before starting processes or reading files
24
  clean_directory()
@@ -477,7 +479,7 @@ def transcribe_audio(audio_path):
477
  audio = preprocess_audio(audio_path)
478
 
479
  # Chargement du modèle
480
- model = load_model()
481
 
482
  # Transcription
483
  transcription = model.transcribe(audio)
 
19
  from concrete.ml.deployment import FHEModelClient
20
  from models.speech_to_text import *
21
  from models.speech_to_text.transcriber.audio import preprocess_audio
22
+ from models.speech_to_text.transcriber.model import load_model_and_processor
23
+
24
 
25
  # Ensure the directory is clean before starting processes or reading files
26
  clean_directory()
 
479
  audio = preprocess_audio(audio_path)
480
 
481
  # Chargement du modèle
482
+ model = load_model_and_processor(model_name="openai/whisper-base")
483
 
484
  # Transcription
485
  transcription = model.transcribe(audio)