Spaces:
Paused
Paused
Upload 2 files
Browse files- app.py +7 -6
- requirements.txt +2 -1
app.py
CHANGED
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import sys
|
3 |
import threading
|
@@ -10,12 +16,7 @@ from inference import postprocess_inst_names
|
|
10 |
from inference import inference_patch
|
11 |
from convert import abc2xml, xml2, pdf2img
|
12 |
|
13 |
-
|
14 |
-
import spaces
|
15 |
-
USING_SPACES = True
|
16 |
-
except ImportError:
|
17 |
-
USING_SPACES = False
|
18 |
-
import zero
|
19 |
|
20 |
|
21 |
def gpu_decorator(func):
|
|
|
1 |
+
try:
|
2 |
+
import spaces
|
3 |
+
USING_SPACES = True
|
4 |
+
except ImportError:
|
5 |
+
USING_SPACES = False
|
6 |
+
import zero
|
7 |
import gradio as gr
|
8 |
import sys
|
9 |
import threading
|
|
|
16 |
from inference import inference_patch
|
17 |
from convert import abc2xml, xml2, pdf2img
|
18 |
|
19 |
+
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
|
22 |
def gpu_decorator(func):
|
requirements.txt
CHANGED
@@ -10,4 +10,5 @@ samplings==0.1.7
|
|
10 |
pyparsing==3.2.1
|
11 |
gradio==5.17.1
|
12 |
PyMuPDF
|
13 |
-
huggingface_hub
|
|
|
|
10 |
pyparsing==3.2.1
|
11 |
gradio==5.17.1
|
12 |
PyMuPDF
|
13 |
+
huggingface_hub
|
14 |
+
zero
|