MeBai commited on
Commit
63b6598
·
verified ·
1 Parent(s): 3d4cdb6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -4,7 +4,6 @@ from datasets import load_dataset
4
  # from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline,WhisperProcessor
5
  from transformers import WhisperProcessor, WhisperForConditionalGeneration
6
 
7
-
8
  import torch
9
  import librosa
10
 
@@ -66,7 +65,7 @@ def transcribe(audio_path):
66
  # Gradio 界面
67
  iface = gr.Interface(
68
  fn=transcribe,
69
- inputs=gr.Audio(sources="microphone", type="filepath"),
70
  outputs="text",
71
  title="Whisper Transcription for Developers",
72
  description="使用 Whisper 和 bigcode 数据集转录开发者相关术语。"
 
4
  # from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline,WhisperProcessor
5
  from transformers import WhisperProcessor, WhisperForConditionalGeneration
6
 
 
7
  import torch
8
  import librosa
9
 
 
65
  # Gradio 界面
66
  iface = gr.Interface(
67
  fn=transcribe,
68
+ inputs=gr.Audio( type="filepath"),
69
  outputs="text",
70
  title="Whisper Transcription for Developers",
71
  description="使用 Whisper 和 bigcode 数据集转录开发者相关术语。"