Update app.py
Browse files
app.py
CHANGED
@@ -26,8 +26,8 @@ def extract_text_from_pptx(file_path):
|
|
26 |
|
27 |
def predict_pptx_content(file_path):
|
28 |
try:
|
29 |
-
extracted_text = extract_text_from_pptx(file_path)
|
30 |
-
cleaned_text = re.sub(r'\s+', ' ', extracted_text)
|
31 |
|
32 |
# Tokenize and encode the cleaned text
|
33 |
input_encoding = tokenizer(cleaned_text, truncation=True, padding=True, return_tensors="pt")
|
|
|
26 |
|
27 |
def predict_pptx_content(file_path):
|
28 |
try:
|
29 |
+
str(extracted_text) = extract_text_from_pptx(file_path)
|
30 |
+
str(cleaned_text) = re.sub(r'\s+', ' ', extracted_text)
|
31 |
|
32 |
# Tokenize and encode the cleaned text
|
33 |
input_encoding = tokenizer(cleaned_text, truncation=True, padding=True, return_tensors="pt")
|