Spaces:
Sleeping
Sleeping
Tushar Malik
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -509,7 +509,7 @@ def chatbot_interface(user_query, response_style, selected_retrieval_methods, se
|
|
| 509 |
|
| 510 |
|
| 511 |
|
| 512 |
-
|
| 513 |
# Assume `pdf_file` is the path to the file, so no need for `.read()`
|
| 514 |
with tempfile.NamedTemporaryFile(mode="wb", suffix=".pdf", delete=False) as tmp:
|
| 515 |
with open(pdf_file, "rb") as f: # Open the file in binary mode
|
|
|
|
| 509 |
|
| 510 |
|
| 511 |
|
| 512 |
+
if pdf_file is not None:
|
| 513 |
# Assume `pdf_file` is the path to the file, so no need for `.read()`
|
| 514 |
with tempfile.NamedTemporaryFile(mode="wb", suffix=".pdf", delete=False) as tmp:
|
| 515 |
with open(pdf_file, "rb") as f: # Open the file in binary mode
|