Spaces:
Running
on
Zero
Running
on
Zero
Liam Dyer
commited on
temp
Browse files
app.py
CHANGED
@@ -3,11 +3,15 @@ import gradio as gr
|
|
3 |
from marker.convert import convert_single_pdf
|
4 |
from marker.models import load_all_models
|
5 |
|
|
|
|
|
6 |
|
7 |
@spaces.GPU
|
8 |
def convert(file_path):
|
9 |
-
|
10 |
-
|
|
|
|
|
11 |
file_path,
|
12 |
model_lst,
|
13 |
max_pages=None,
|
|
|
3 |
from marker.convert import convert_single_pdf
|
4 |
from marker.models import load_all_models
|
5 |
|
6 |
+
model_lst = load_all_models()
|
7 |
+
|
8 |
|
9 |
@spaces.GPU
|
10 |
def convert(file_path):
|
11 |
+
print(file_path)
|
12 |
+
global model_lst
|
13 |
+
|
14 |
+
full_text, images = convert_single_pdf(
|
15 |
file_path,
|
16 |
model_lst,
|
17 |
max_pages=None,
|