wealthcoders commited on
Commit
476f460
·
verified ·
1 Parent(s): de83374

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +10 -2
handler.py CHANGED
@@ -101,8 +101,16 @@ class EndpointHandler:
101
  eval_mode=True
102
  )
103
 
104
- print(str(result))
105
- return result
 
 
 
 
 
 
 
 
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}")