Spaces:
Runtime error
Runtime error
Commit
·
47a4414
1
Parent(s):
206efbc
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,7 +29,7 @@ class GradioInference:
|
|
| 29 |
self.yt = None
|
| 30 |
|
| 31 |
# Initialize summary model for English
|
| 32 |
-
self.summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
|
| 33 |
|
| 34 |
# Initialize VoiceLabT5 model and tokenizer
|
| 35 |
self.keyword_model = T5ForConditionalGeneration.from_pretrained(
|
|
@@ -80,7 +80,7 @@ class GradioInference:
|
|
| 80 |
|
| 81 |
# Perform summarization on the transcription
|
| 82 |
transcription_summary = self.summarizer(
|
| 83 |
-
results["text"], max_length=
|
| 84 |
)
|
| 85 |
|
| 86 |
#### Resumen multilingue
|
|
|
|
| 29 |
self.yt = None
|
| 30 |
|
| 31 |
# Initialize summary model for English
|
| 32 |
+
self.summarizer = pipeline("summarization", model="facebook/bart-large-cnn", truncation=True)
|
| 33 |
|
| 34 |
# Initialize VoiceLabT5 model and tokenizer
|
| 35 |
self.keyword_model = T5ForConditionalGeneration.from_pretrained(
|
|
|
|
| 80 |
|
| 81 |
# Perform summarization on the transcription
|
| 82 |
transcription_summary = self.summarizer(
|
| 83 |
+
results["text"], max_length=256, min_length=30, do_sample=False, truncation=True
|
| 84 |
)
|
| 85 |
|
| 86 |
#### Resumen multilingue
|