peb-peb commited on
Commit
c359414
1 Parent(s): 9603f5e

fetch from JSON data

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -19,10 +19,11 @@ def main(audio_file, number_of_speakers):
19
  # text_data = transcribe(audio_file, number_of_speakers)
20
  # print(text_data)
21
  text_data = ""
22
- topic = topic_gen(text_data)
23
- summary = summarizer(text_data)
24
- sentiment_analysis = sentiment_analyser(text_data)
25
- return topic, summary, sentiment_analysis
 
26
 
27
  # UI Interface on the Hugging Face Page
28
  with gr.Blocks() as demo:
 
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)
25
+ sent_analysis = sent_analy[0]["label"] + " (" + int(sent_analy[0]["score"]) * 100 + "%)"
26
+ return topic, summary, sent_analysis
27
 
28
  # UI Interface on the Hugging Face Page
29
  with gr.Blocks() as demo: