not-lain commited on
Commit
1400040
·
1 Parent(s): 37f254e
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -5,10 +5,10 @@ from typing import List
5
  from PIL import Image
6
  from loadimg import load_img
7
  import io
8
- import markitdown
9
 
10
  converter = Converter()
11
-
12
 
13
  def convert_file_to_pdf(filename: str) -> str:
14
  """
@@ -62,7 +62,7 @@ def convert_file_to_markdown(filename: str) -> str:
62
  Returns:
63
  str: The markdown representation of the file.
64
  """
65
- return markitdown.convert(filename.name).text_content
66
 
67
 
68
  # Create individual interfaces
 
5
  from PIL import Image
6
  from loadimg import load_img
7
  import io
8
+ from markitdown import MarkItDown
9
 
10
  converter = Converter()
11
+ md = MarkItDown()
12
 
13
  def convert_file_to_pdf(filename: str) -> str:
14
  """
 
62
  Returns:
63
  str: The markdown representation of the file.
64
  """
65
+ return md.convert(filename.name).text_content
66
 
67
 
68
  # Create individual interfaces