Spaces:
Build error
Build error
Regino
commited on
Commit
·
fee8ffb
1
Parent(s):
4c69665
jsbdf
Browse files
app.py
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import fitz # PyMuPDF for PDF extraction
|
| 3 |
import re
|
|
@@ -6,10 +11,6 @@ from sumy.nlp.tokenizers import Tokenizer
|
|
| 6 |
from sumy.summarizers.lsa import LsaSummarizer
|
| 7 |
from rouge_score import rouge_scorer # For ROUGE score evaluation
|
| 8 |
|
| 9 |
-
import nltk
|
| 10 |
-
|
| 11 |
-
# Ensure the necessary tokenizer is downloaded
|
| 12 |
-
nltk.download("punkt")
|
| 13 |
|
| 14 |
# Function to extract text from PDF
|
| 15 |
def extract_text_from_pdf(uploaded_file):
|
|
|
|
| 1 |
+
import nltk
|
| 2 |
+
|
| 3 |
+
# Ensure the necessary tokenizer is downloaded
|
| 4 |
+
nltk.download("punkt")
|
| 5 |
+
|
| 6 |
import streamlit as st
|
| 7 |
import fitz # PyMuPDF for PDF extraction
|
| 8 |
import re
|
|
|
|
| 11 |
from sumy.summarizers.lsa import LsaSummarizer
|
| 12 |
from rouge_score import rouge_scorer # For ROUGE score evaluation
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
# Function to extract text from PDF
|
| 16 |
def extract_text_from_pdf(uploaded_file):
|