Spaces:
Runtime error
Runtime error
All the docs
Browse files
.DS_Store
CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
|
|
app.py
CHANGED
@@ -9,7 +9,6 @@ from transformers import pipeline
|
|
9 |
from datasets import load_dataset
|
10 |
import soundfile as sf
|
11 |
from IPython.display import Audio
|
12 |
-
import numpy as np
|
13 |
from datasets import load_dataset
|
14 |
import sentencepiece as spm
|
15 |
import os
|
@@ -94,7 +93,7 @@ def extract_abstract(text_per_pagy):
|
|
94 |
if start_index != -1:
|
95 |
start_index += len("Abstract") + 1
|
96 |
|
97 |
-
end_markers = ["Introduction", "Summary", "Overview", "Background"]
|
98 |
end_index = -1
|
99 |
|
100 |
for marker in end_markers:
|
@@ -131,7 +130,7 @@ def main_function(uploaded_filepath):
|
|
131 |
|
132 |
#abstract the summary with my pipeline and model, deciding the length
|
133 |
summarizer = pipeline("summarization", model="pszemraj/long-t5-tglobal-base-sci-simplify")
|
134 |
-
summary = summarizer(abstract_text, max_length=
|
135 |
|
136 |
#generating the audio from the text, with my pipeline and model
|
137 |
synthesiser = pipeline("text-to-speech", model="microsoft/speecht5_tts")
|
|
|
9 |
from datasets import load_dataset
|
10 |
import soundfile as sf
|
11 |
from IPython.display import Audio
|
|
|
12 |
from datasets import load_dataset
|
13 |
import sentencepiece as spm
|
14 |
import os
|
|
|
93 |
if start_index != -1:
|
94 |
start_index += len("Abstract") + 1
|
95 |
|
96 |
+
end_markers = ["Introduction", "Summary", "Overview", "Background", "Contents"]
|
97 |
end_index = -1
|
98 |
|
99 |
for marker in end_markers:
|
|
|
130 |
|
131 |
#abstract the summary with my pipeline and model, deciding the length
|
132 |
summarizer = pipeline("summarization", model="pszemraj/long-t5-tglobal-base-sci-simplify")
|
133 |
+
summary = summarizer(abstract_text, max_length=65, do_sample=False)[0]['summary_text']
|
134 |
|
135 |
#generating the audio from the text, with my pipeline and model
|
136 |
synthesiser = pipeline("text-to-speech", model="microsoft/speecht5_tts")
|