sblumenf commited on
Commit
919f74f
·
verified ·
1 Parent(s): a8fb1f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -1,6 +1,19 @@
1
- import gradio as gr
 
 
 
 
 
 
 
 
 
 
 
 
2
  from marker.pdf import PDF # Updated import path
3
  import os
 
4
 
5
  def convert_pdf(input_file, output_format):
6
  """
 
1
+ import subprocess
2
+ import sys
3
+
4
+ # Install the 'marker' package from GitHub if not already installed
5
+ try:
6
+ import marker
7
+ except ImportError:
8
+ subprocess.check_call([sys.executable, "-m", "pip", "install", "git+https://github.com/VikParuchuri/marker.git"])
9
+
10
+ # Verify the marker package is installed and check its contents
11
+ import marker
12
+ print("Available modules in marker:", dir(marker))
13
+
14
  from marker.pdf import PDF # Updated import path
15
  import os
16
+ import gradio as gr
17
 
18
  def convert_pdf(input_file, output_format):
19
  """