Spaces:
Runtime error
Runtime error
Commit ·
2937856
1
Parent(s): a9bc837
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,7 +41,7 @@ class GradioInference:
|
|
| 41 |
|
| 42 |
# Perform summarization on the transcription
|
| 43 |
transcription_summary = self.summarizer(
|
| 44 |
-
results["text"], max_length=
|
| 45 |
)
|
| 46 |
|
| 47 |
# Extract keywords using VoiceLabT5
|
|
@@ -84,7 +84,7 @@ class GradioInference:
|
|
| 84 |
|
| 85 |
# Perform summarization on the transcription
|
| 86 |
transcription_summary = self.summarizer(
|
| 87 |
-
results["text"], max_length=
|
| 88 |
)
|
| 89 |
|
| 90 |
# Extract keywords using VoiceLabT5
|
|
@@ -100,7 +100,7 @@ class GradioInference:
|
|
| 100 |
keywords = [x.strip() for x in predicted.split(",") if x.strip()]
|
| 101 |
|
| 102 |
label = self.classifier(results["text"])[0]["label"]
|
| 103 |
-
wordcloud = WordCloud(
|
| 104 |
results["text"]
|
| 105 |
)
|
| 106 |
wordcloud_image = wordcloud.to_image()
|
|
@@ -225,7 +225,7 @@ with block:
|
|
| 225 |
|
| 226 |
with gr.Accordion("How does it work?", open=False):
|
| 227 |
gr.Markdown(
|
| 228 |
-
"Works by using OpenAI's Whisper,
|
| 229 |
)
|
| 230 |
|
| 231 |
gr.HTML(
|
|
|
|
| 41 |
|
| 42 |
# Perform summarization on the transcription
|
| 43 |
transcription_summary = self.summarizer(
|
| 44 |
+
results["text"], max_length=512, min_length=30, do_sample=False
|
| 45 |
)
|
| 46 |
|
| 47 |
# Extract keywords using VoiceLabT5
|
|
|
|
| 84 |
|
| 85 |
# Perform summarization on the transcription
|
| 86 |
transcription_summary = self.summarizer(
|
| 87 |
+
results["text"], max_length=512, min_length=30, do_sample=False
|
| 88 |
)
|
| 89 |
|
| 90 |
# Extract keywords using VoiceLabT5
|
|
|
|
| 100 |
keywords = [x.strip() for x in predicted.split(",") if x.strip()]
|
| 101 |
|
| 102 |
label = self.classifier(results["text"])[0]["label"]
|
| 103 |
+
wordcloud = WordCloud().generate(
|
| 104 |
results["text"]
|
| 105 |
)
|
| 106 |
wordcloud_image = wordcloud.to_image()
|
|
|
|
| 225 |
|
| 226 |
with gr.Accordion("How does it work?", open=False):
|
| 227 |
gr.Markdown(
|
| 228 |
+
"Works by using OpenAI's Whisper, BART for summarization and VoiceLabT5 for Keyword Extraction."
|
| 229 |
)
|
| 230 |
|
| 231 |
gr.HTML(
|