Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ def get_pdf(pdf_link):
|
|
31 |
return unique_filename
|
32 |
|
33 |
|
34 |
-
|
35 |
def predict(image):
|
36 |
# prepare PDF image for the model
|
37 |
image = Image.open(image)
|
@@ -50,7 +50,7 @@ def predict(image):
|
|
50 |
return page_sequence
|
51 |
|
52 |
|
53 |
-
|
54 |
def inference(pdf_file, pdf_link):
|
55 |
if pdf_file is None:
|
56 |
if pdf_link == '':
|
|
|
31 |
return unique_filename
|
32 |
|
33 |
|
34 |
+
@spaces.GPU
|
35 |
def predict(image):
|
36 |
# prepare PDF image for the model
|
37 |
image = Image.open(image)
|
|
|
50 |
return page_sequence
|
51 |
|
52 |
|
53 |
+
|
54 |
def inference(pdf_file, pdf_link):
|
55 |
if pdf_file is None:
|
56 |
if pdf_link == '':
|