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