Update handler.py
Browse files- handler.py +10 -2
handler.py
CHANGED
|
@@ -101,8 +101,16 @@ class EndpointHandler:
|
|
| 101 |
eval_mode=True
|
| 102 |
)
|
| 103 |
|
| 104 |
-
|
| 105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
|
| 107 |
except Exception as e:
|
| 108 |
print(f"Error processing image: {e}")
|
|
|
|
| 101 |
eval_mode=True
|
| 102 |
)
|
| 103 |
|
| 104 |
+
for fname in os.listdir(temp_dir):
|
| 105 |
+
if fname.endswith(".md") or fname.endswith(".mmd"):
|
| 106 |
+
md_path = os.path.join(temp_dir, fname)
|
| 107 |
+
with open(md_path, 'r', encoding='utf-8') as f:
|
| 108 |
+
markdown = f.read()
|
| 109 |
+
print("Markdown output:\n", markdown)
|
| 110 |
+
return markdown
|
| 111 |
+
|
| 112 |
+
#print(str(result))
|
| 113 |
+
#return result
|
| 114 |
|
| 115 |
except Exception as e:
|
| 116 |
print(f"Error processing image: {e}")
|