peb-peb commited on
Commit
3a3a57f
1 Parent(s): c88db77

add dummy data

Browse files
Files changed (2) hide show
  1. app.py +2 -1
  2. data.py +24 -0
app.py CHANGED
@@ -4,6 +4,7 @@ import requests
4
  from sentiment_analysis import sentiment_analyser
5
  from summary import summarizer
6
  from topic import topic_gen
 
7
 
8
  def transcribe2():
9
  response = requests.post("https://dwarkesh-whisper-speaker-recognition.hf.space/run/predict", json={
@@ -18,7 +19,7 @@ def main(audio_file, number_of_speakers):
18
  # Audio to Text Converter
19
  # text_data = transcribe(audio_file, number_of_speakers)
20
  # print(text_data)
21
- text_data = ""
22
  topic = topic_gen(text_data)[0]["generated_text"]
23
  summary = summarizer(text_data)[0]["summary_text"]
24
  sent_analy = sentiment_analyser(text_data)
 
4
  from sentiment_analysis import sentiment_analyser
5
  from summary import summarizer
6
  from topic import topic_gen
7
+ from data import data
8
 
9
  def transcribe2():
10
  response = requests.post("https://dwarkesh-whisper-speaker-recognition.hf.space/run/predict", json={
 
19
  # Audio to Text Converter
20
  # text_data = transcribe(audio_file, number_of_speakers)
21
  # print(text_data)
22
+ text_data = data
23
  topic = topic_gen(text_data)[0]["generated_text"]
24
  summary = summarizer(text_data)[0]["summary_text"]
25
  sent_analy = sentiment_analyser(text_data)
data.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ data = """
2
+ SPEAKER 1 0:00:00
3
+ Thank you for calling Martha's Flowers. How may I assist you?
4
+ SPEAKER 2 0:00:04
5
+ Hello, I'd like to order flowers and I think you have what I'm looking for.
6
+ SPEAKER 1 0:00:08
7
+ I'd be happy to take care of your order. May I have your name please?
8
+ SPEAKER 2 0:00:10
9
+ Randall Thomas.
10
+ SPEAKER 1 0:00:12
11
+ Randall Thomas. Can you spell that for me?
12
+ SPEAKER 2 0:00:16
13
+ Randall, R-A-N-D-A-L-L, Thomas, T-H-O-M-A-N.
14
+ SPEAKER 1 0:00:22
15
+ Thank you for that information, Randall. May I have your home or office number and area code first?
16
+ SPEAKER 2 0:00:28
17
+ Area code 409, then 866-5088.
18
+ SPEAKER 1 0:00:34
19
+ That's 409-866-5088. Do you have a fax number or email address?
20
+ SPEAKER 2 0:00:42
21
+ My email is randall.thomas at gmail.com.
22
+ SPEAKER 1 0:00:46
23
+ randall.thomas at gmail.com.
24
+ """