Update server.py
Browse files
server.py
CHANGED
|
@@ -4,12 +4,10 @@ from marker.convert import convert_single_pdf
|
|
| 4 |
from marker.models import load_all_models
|
| 5 |
from marker.settings import Settings
|
| 6 |
import gradio as gr
|
| 7 |
-
import spaces
|
| 8 |
|
| 9 |
|
| 10 |
model_list = load_all_models()
|
| 11 |
|
| 12 |
-
@spaces.GPU(duration=300)
|
| 13 |
def parse_pdf_and_return_markdown(pdf_file: bytes , extract_images: bool):
|
| 14 |
full_text, images, out_meta = convert_single_pdf(pdf_file, model_list)
|
| 15 |
image_data = {}
|
|
|
|
| 4 |
from marker.models import load_all_models
|
| 5 |
from marker.settings import Settings
|
| 6 |
import gradio as gr
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
model_list = load_all_models()
|
| 10 |
|
|
|
|
| 11 |
def parse_pdf_and_return_markdown(pdf_file: bytes , extract_images: bool):
|
| 12 |
full_text, images, out_meta = convert_single_pdf(pdf_file, model_list)
|
| 13 |
image_data = {}
|