nirajandhakal commited on
Commit
85a9111
1 Parent(s): 4bc4348

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import gradio as gr
2
  import torch
3
  from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
4
- from datasets import load_dataset
5
 
6
  # Set up the device (GPU or CPU)
7
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
@@ -37,7 +36,7 @@ def transcribe_audio(audio):
37
  # Create a Gradio interface
38
  demo = gr.Interface(
39
  transcribe_audio,
40
- inputs=gr.Audio(source="upload", type="file"),
41
  outputs="text",
42
  title="Speech-to-Text Transcription",
43
  description="Upload an audio file to transcribe its content.",
 
1
  import gradio as gr
2
  import torch
3
  from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
 
4
 
5
  # Set up the device (GPU or CPU)
6
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
 
36
  # Create a Gradio interface
37
  demo = gr.Interface(
38
  transcribe_audio,
39
+ inputs=gr.Audio(type="file"),
40
  outputs="text",
41
  title="Speech-to-Text Transcription",
42
  description="Upload an audio file to transcribe its content.",