jpdiazpardo commited on
Commit
7f77256
1 Parent(s): cb9a89f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -48,7 +48,7 @@ title = "Scream: Fine-Tuned Whisper model for automatic gutural speech recogniti
48
  classifier = pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base", top_k=None)
49
 
50
  #Functions-----------------------------------------------------------------------------------------------------------------------
51
- def transcribe(link,download,thumbnail,file,use_timestamps,sentiment_analysis):#file, return_timestamps, *kwargs):
52
  '''inputs: file, return_timestamps'''
53
  outputs = pipe(file, batch_size=BATCH_SIZE, generate_kwargs={"task": 'transcribe'}, return_timestamps=True)
54
  text = outputs["text"]
@@ -95,7 +95,7 @@ def hide_sa(value):
95
  #Input components
96
  yt_link = gr.Textbox(value=None,label="YouTube link", info = "Optional: Copy and paste YouTube URL")
97
  audio_input = gr.Audio(source="upload", type="filepath", label="Upload audio file for transcription")
98
- download_button = gr.Button("Download")
99
  thumbnail = gr.HTML(value=embed_html, visible=False, label = "Thumbnail")
100
  sa_checkbox = gr.Checkbox(value=True, label="Sentiment analysis")
101
 
 
48
  classifier = pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base", top_k=None)
49
 
50
  #Functions-----------------------------------------------------------------------------------------------------------------------
51
+ def transcribe(link,thumbnail,file,use_timestamps,sentiment_analysis):#file, return_timestamps, *kwargs):
52
  '''inputs: file, return_timestamps'''
53
  outputs = pipe(file, batch_size=BATCH_SIZE, generate_kwargs={"task": 'transcribe'}, return_timestamps=True)
54
  text = outputs["text"]
 
95
  #Input components
96
  yt_link = gr.Textbox(value=None,label="YouTube link", info = "Optional: Copy and paste YouTube URL")
97
  audio_input = gr.Audio(source="upload", type="filepath", label="Upload audio file for transcription")
98
+ download_button = gr.Button(value="Download")
99
  thumbnail = gr.HTML(value=embed_html, visible=False, label = "Thumbnail")
100
  sa_checkbox = gr.Checkbox(value=True, label="Sentiment analysis")
101