Subzero7473 commited on
Commit
57cba06
·
1 Parent(s): 8e8bf44

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -5,9 +5,9 @@ import whisper
5
 
6
  from transformers import pipeline
7
 
8
- #import nltk
9
- #nltk.download('punkt')
10
- #from nltk.tokenize import sent_tokenize
11
 
12
 
13
  model = whisper.load_model('base')
@@ -23,8 +23,8 @@ def get_transcript_sentiment(url):
23
  result = model.transcribe('audio.mp3')
24
 
25
  # Split the transcript into sentences
26
- #transcript_sentences = sent_tokenize(result['text'])
27
- transcript_sentences = result['text'].split('.')
28
 
29
  # Run the Hugging Face sentiment analysis pipeline
30
  sentiment_pipeline = pipeline('sentiment-analysis')
 
5
 
6
  from transformers import pipeline
7
 
8
+ import nltk
9
+ nltk.download('punkt')
10
+ from nltk.tokenize import sent_tokenize
11
 
12
 
13
  model = whisper.load_model('base')
 
23
  result = model.transcribe('audio.mp3')
24
 
25
  # Split the transcript into sentences
26
+ transcript_sentences = sent_tokenize(result['text'])
27
+ #transcript_sentences = result['text'].split('.')
28
 
29
  # Run the Hugging Face sentiment analysis pipeline
30
  sentiment_pipeline = pipeline('sentiment-analysis')