Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def process_file(uploaded_file):
|
|
50 |
return {"type": "text", "content": "".join(page.extract_text() for page in reader.pages if page.extract_text())}
|
51 |
|
52 |
if file_type == "zip":
|
53 |
-
|
54 |
newline = "\n"
|
55 |
content = f"ZIP Contents:{newline}"
|
56 |
|
|
|
50 |
return {"type": "text", "content": "".join(page.extract_text() for page in reader.pages if page.extract_text())}
|
51 |
|
52 |
if file_type == "zip":
|
53 |
+
with zipfile.ZipFile(uploaded_file) as z:
|
54 |
newline = "\n"
|
55 |
content = f"ZIP Contents:{newline}"
|
56 |
|