Update app.py
Browse files
app.py
CHANGED
|
@@ -50,7 +50,9 @@ def process_file(uploaded_file):
|
|
| 50 |
|
| 51 |
if file_type == "zip":
|
| 52 |
with zipfile.ZipFile(uploaded_file) as z:
|
| 53 |
-
|
|
|
|
|
|
|
| 54 |
|
| 55 |
return {"type": "error", "content": "Unsupported file format"}
|
| 56 |
|
|
|
|
| 50 |
|
| 51 |
if file_type == "zip":
|
| 52 |
with zipfile.ZipFile(uploaded_file) as z:
|
| 53 |
+
# Fix: Define newline character outside f-string
|
| 54 |
+
newline = "\n"
|
| 55 |
+
return {"type": "text", "content": f"ZIP Contents:{newline}{newline.join(z.namelist())}"}
|
| 56 |
|
| 57 |
return {"type": "error", "content": "Unsupported file format"}
|
| 58 |
|