Spaces:
Sleeping
Sleeping
fetch from JSON data
Browse files
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 |
-
|
25 |
-
|
|
|
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:
|