Rouhani2025 commited on
Commit
76f39bf
·
verified ·
1 Parent(s): f8ac08a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -3,10 +3,10 @@ import whisper
3
  from transformers import pipeline
4
 
5
  # Load Whisper model
6
- whisper_model = whisper.load_model("base", device="cpu")
7
 
8
  # Load the text correction model
9
- correction_pipeline = pipeline("text2text-generation", model="tiiuae/falcon-7b-instruct", device=-1)
10
 
11
  # Function to preprocess audio and transcribe it using Whisper
12
  def transcribe_audio(audio_file):
@@ -37,4 +37,4 @@ interface = gr.Interface(
37
  )
38
 
39
  # Launch the app
40
- interface.launch()
 
3
  from transformers import pipeline
4
 
5
  # Load Whisper model
6
+ whisper_model = whisper.load_model("small", device="cpu")
7
 
8
  # Load the text correction model
9
+ correction_pipeline = pipeline("text2text-generation", model="tiiuae/falcon3-1b-instruct", device=-1)
10
 
11
  # Function to preprocess audio and transcribe it using Whisper
12
  def transcribe_audio(audio_file):
 
37
  )
38
 
39
  # Launch the app
40
+ interface.launch(share=True)