Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -117,15 +117,9 @@ def converti(path):
|
|
117 |
|
118 |
return text_per_page
|
119 |
|
120 |
-
# from google.colab import drive
|
121 |
-
# drive.mount('/content/drive')
|
122 |
-
|
123 |
-
# pdf_path = '/content/drive/MyDrive/' + path
|
124 |
pdf_path = path
|
125 |
text_per_page = read_pdf(pdf_path)
|
126 |
|
127 |
-
return "fin qui ok"
|
128 |
-
|
129 |
abstr = ''
|
130 |
while len(abstr) == 0:
|
131 |
for par in range(len(text_per_page)):
|
@@ -135,6 +129,8 @@ def converti(path):
|
|
135 |
abstr0 = mystring[mystring.find('Abstract\n')+10:]
|
136 |
abstr = abstr0[:abstr0.find('1\n')]
|
137 |
# print(abstr)
|
|
|
|
|
138 |
|
139 |
from transformers import pipeline
|
140 |
summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
|
|
|
117 |
|
118 |
return text_per_page
|
119 |
|
|
|
|
|
|
|
|
|
120 |
pdf_path = path
|
121 |
text_per_page = read_pdf(pdf_path)
|
122 |
|
|
|
|
|
123 |
abstr = ''
|
124 |
while len(abstr) == 0:
|
125 |
for par in range(len(text_per_page)):
|
|
|
129 |
abstr0 = mystring[mystring.find('Abstract\n')+10:]
|
130 |
abstr = abstr0[:abstr0.find('1\n')]
|
131 |
# print(abstr)
|
132 |
+
|
133 |
+
return abstr
|
134 |
|
135 |
from transformers import pipeline
|
136 |
summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
|