Athspi commited on
Commit
b25ba0c
·
verified ·
1 Parent(s): d30da85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  from faster_whisper import WhisperModel
3
 
4
  # Load the Faster Whisper model
5
- model = WhisperModel("large-v3", device="cpu") # Use "cuda" for GPU
6
 
7
  # Define the transcription function
8
  def transcribe_audio(audio_file):
@@ -21,7 +21,7 @@ def transcribe_audio(audio_file):
21
  # Create the Gradio interface
22
  interface = gr.Interface(
23
  fn=transcribe_audio, # Function to process the input
24
- inputs=gr.Audio(source="upload", type="filepath", label="Upload Audio"), # Input: Audio file
25
  outputs=gr.Textbox(label="Transcription"), # Output: Textbox for the transcription
26
  title="Audio-to-Text Transcription",
27
  description=(
 
2
  from faster_whisper import WhisperModel
3
 
4
  # Load the Faster Whisper model
5
+ model = WhisperModel("large-v3", device="cpu") # Use "cuda" for GPU acceleration
6
 
7
  # Define the transcription function
8
  def transcribe_audio(audio_file):
 
21
  # Create the Gradio interface
22
  interface = gr.Interface(
23
  fn=transcribe_audio, # Function to process the input
24
+ inputs=gr.Audio(type="filepath", label="Upload Audio"), # Corrected input component
25
  outputs=gr.Textbox(label="Transcription"), # Output: Textbox for the transcription
26
  title="Audio-to-Text Transcription",
27
  description=(