Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,11 +22,11 @@ doc_converter = DocumentConverter(
|
|
| 22 |
def convert_to_markdown(file):
|
| 23 |
# Save the uploaded file to a temporary path
|
| 24 |
input_path = Path(file.name)
|
| 25 |
-
|
|
|
|
| 26 |
|
| 27 |
# Convert the document
|
| 28 |
result = doc_converter.convert(str(input_path))
|
| 29 |
-
|
| 30 |
|
| 31 |
# Prepare output directory
|
| 32 |
output_dir = Path("output")
|
|
|
|
| 22 |
def convert_to_markdown(file):
|
| 23 |
# Save the uploaded file to a temporary path
|
| 24 |
input_path = Path(file.name)
|
| 25 |
+
with open(input_path, 'wb') as f:
|
| 26 |
+
f.write(file.read())
|
| 27 |
|
| 28 |
# Convert the document
|
| 29 |
result = doc_converter.convert(str(input_path))
|
|
|
|
| 30 |
|
| 31 |
# Prepare output directory
|
| 32 |
output_dir = Path("output")
|