Spaces:
Runtime error
Runtime error
RamAnanth1
commited on
Commit
·
a11f647
1
Parent(s):
58d76c4
Update app.py
Browse files
app.py
CHANGED
@@ -85,15 +85,20 @@ def get_transcript_url(url):
|
|
85 |
time.sleep(3)
|
86 |
|
87 |
res = transcription_result['sentiment_analysis_results']
|
88 |
-
print(type(res))
|
89 |
sentiment_analysis_result = ''
|
90 |
|
91 |
df = pd.DataFrame(res)
|
92 |
df = df.loc[:, ["text", "sentiment", "confidence"]]
|
93 |
|
94 |
topic = transcription_result['iab_categories_result']['summary']
|
95 |
-
|
96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
|
99 |
return transcription_result['text'], transcription_result['summary'], df, df_topic.head(3)
|
|
|
85 |
time.sleep(3)
|
86 |
|
87 |
res = transcription_result['sentiment_analysis_results']
|
|
|
88 |
sentiment_analysis_result = ''
|
89 |
|
90 |
df = pd.DataFrame(res)
|
91 |
df = df.loc[:, ["text", "sentiment", "confidence"]]
|
92 |
|
93 |
topic = transcription_result['iab_categories_result']['summary']
|
94 |
+
|
95 |
+
topic_dict = {}
|
96 |
+
|
97 |
+
for k in topic:
|
98 |
+
topic_dict["Topic"] = " > ".join(k.split(">"))
|
99 |
+
topic_dict["Relevance"] = topic[k]
|
100 |
+
|
101 |
+
df_topic = pd.DataFrame(topic_dict)
|
102 |
|
103 |
|
104 |
return transcription_result['text'], transcription_result['summary'], df, df_topic.head(3)
|