Subzero7473 commited on
Commit
cd7658c
·
1 Parent(s): 61fab90

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
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,7 +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
 
28
  # Run the Hugging Face sentiment analysis pipeline
29
  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')