jpdiazpardo commited on
Commit
408afb3
1 Parent(s): 450a858

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,7 +14,7 @@ from functions.youtube import get_youtube_video_id
14
  #---------------------------------------------------------------------
15
  examples = [[#"When a Demon Defiles a Witch.wav", #"https://www.youtube.com/watch?v=W72Lnz1n-jw&ab_channel=Whitechapel-Topic",
16
  #"When a Demon Defiles a Witch.wav", #"<iframe src='https://www.youtube.com/embed/W72Lnz1n-jw' title='YouTube video player' frameborder='0' allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture' allowfullscreen></iframe>",
17
- "When a Demon Defiles a Witch.wav",True, True]]
18
 
19
  MODEL_NAME = "openai/whisper-medium"
20
  BATCH_SIZE = 8
@@ -49,7 +49,7 @@ title = "Scream: Fine-Tuned Whisper model for automatic gutural speech recogniti
49
  classifier = pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base", top_k=None)
50
 
51
  #Functions-----------------------------------------------------------------------------------------------------------------------
52
- def transcribe(file,use_timestamps,sentiment_analysis):#file, return_timestamps, *kwargs):
53
  '''inputs: file, return_timestamps'''
54
  outputs = pipe(file, batch_size=BATCH_SIZE, generate_kwargs={"task": 'transcribe'}, return_timestamps=True)
55
  text = outputs["text"]
 
14
  #---------------------------------------------------------------------
15
  examples = [[#"When a Demon Defiles a Witch.wav", #"https://www.youtube.com/watch?v=W72Lnz1n-jw&ab_channel=Whitechapel-Topic",
16
  #"When a Demon Defiles a Witch.wav", #"<iframe src='https://www.youtube.com/embed/W72Lnz1n-jw' title='YouTube video player' frameborder='0' allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture' allowfullscreen></iframe>",
17
+ "When a Demon Defiles a Witch.wav",True]]#, True]]
18
 
19
  MODEL_NAME = "openai/whisper-medium"
20
  BATCH_SIZE = 8
 
49
  classifier = pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base", top_k=None)
50
 
51
  #Functions-----------------------------------------------------------------------------------------------------------------------
52
+ def transcribe(file,use_timestamps):#,sentiment_analysis):#file, return_timestamps, *kwargs):
53
  '''inputs: file, return_timestamps'''
54
  outputs = pipe(file, batch_size=BATCH_SIZE, generate_kwargs={"task": 'transcribe'}, return_timestamps=True)
55
  text = outputs["text"]