Spaces:
Runtime error
Runtime error
RamAnanth1
commited on
Commit
·
25a935c
1
Parent(s):
a11f647
Update app.py
Browse files
app.py
CHANGED
@@ -92,13 +92,15 @@ def get_transcript_url(url):
|
|
92 |
|
93 |
topic = transcription_result['iab_categories_result']['summary']
|
94 |
|
95 |
-
|
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(
|
102 |
|
103 |
|
104 |
return transcription_result['text'], transcription_result['summary'], df, df_topic.head(3)
|
|
|
92 |
|
93 |
topic = transcription_result['iab_categories_result']['summary']
|
94 |
|
95 |
+
topics = []
|
96 |
|
97 |
for k in topic:
|
98 |
+
topic_dict = {}
|
99 |
topic_dict["Topic"] = " > ".join(k.split(">"))
|
100 |
topic_dict["Relevance"] = topic[k]
|
101 |
+
topics.append(topic_dict)
|
102 |
|
103 |
+
df_topic = pd.DataFrame(topics)
|
104 |
|
105 |
|
106 |
return transcription_result['text'], transcription_result['summary'], df, df_topic.head(3)
|