Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -86,6 +86,8 @@ def upload_files(files):
|
|
86 |
try:
|
87 |
for file in files:
|
88 |
file_path = file.name
|
|
|
|
|
89 |
if file_path.endswith('.pdf'):
|
90 |
text = extract_text_from_pdf(file_path)
|
91 |
elif file_path.endswith('.docx'):
|
|
|
86 |
try:
|
87 |
for file in files:
|
88 |
file_path = file.name
|
89 |
+
file.save(file_path) # Saving file in Hugging Face space
|
90 |
+
|
91 |
if file_path.endswith('.pdf'):
|
92 |
text = extract_text_from_pdf(file_path)
|
93 |
elif file_path.endswith('.docx'):
|