Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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("
|
7 |
|
8 |
# Load the text correction model
|
9 |
-
correction_pipeline = pipeline("text2text-generation", model="tiiuae/
|
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)
|