Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -186,16 +186,14 @@ if uploaded_file is not None:
|
|
| 186 |
new=[]
|
| 187 |
for w in words_out:
|
| 188 |
new+=w.split('\n')
|
| 189 |
-
|
| 190 |
words_out = [i for i in new if len(i)>2]
|
| 191 |
# print(words_out)
|
| 192 |
words_out=sorted(words_out, key=len,reverse=True)
|
| 193 |
|
| 194 |
-
print(words_out)
|
| 195 |
for i in words_out:
|
| 196 |
-
redacted_text+=i+'|||'
|
| 197 |
redact_text(pg,i)
|
| 198 |
-
st.text_area(redacted_text)
|
| 199 |
|
| 200 |
output_pdf = "output_redacted.pdf"
|
| 201 |
pdf_document.save(output_pdf)
|
|
|
|
| 186 |
new=[]
|
| 187 |
for w in words_out:
|
| 188 |
new+=w.split('\n')
|
| 189 |
+
new+=bert_words
|
| 190 |
words_out = [i for i in new if len(i)>2]
|
| 191 |
# print(words_out)
|
| 192 |
words_out=sorted(words_out, key=len,reverse=True)
|
| 193 |
|
|
|
|
| 194 |
for i in words_out:
|
|
|
|
| 195 |
redact_text(pg,i)
|
| 196 |
+
# st.text_area(redacted_text)
|
| 197 |
|
| 198 |
output_pdf = "output_redacted.pdf"
|
| 199 |
pdf_document.save(output_pdf)
|