Spaces:
Running
on
L4
Running
on
L4
Update app.py
Browse files
app.py
CHANGED
@@ -15,9 +15,9 @@ from huggingface_hub import snapshot_download
|
|
15 |
model_dir = snapshot_download('opendatalab/PDF-Extract-Kit')
|
16 |
|
17 |
os.system('wget https://github.com/opendatalab/MinerU/raw/master/magic-pdf.template.json')
|
18 |
-
os.system('cp magic-pdf.template.json
|
19 |
-
os.system(f"sed -i 's|/tmp/models|{model_dir}/models|g' /
|
20 |
-
# os.system("sed -i 's|cpu|cuda|g' /
|
21 |
|
22 |
import gradio as gr
|
23 |
from loguru import logger
|
|
|
15 |
model_dir = snapshot_download('opendatalab/PDF-Extract-Kit')
|
16 |
|
17 |
os.system('wget https://github.com/opendatalab/MinerU/raw/master/magic-pdf.template.json')
|
18 |
+
os.system('cp magic-pdf.template.json ~/magic-pdf.json')
|
19 |
+
os.system(f"sed -i 's|/tmp/models|{model_dir}/models|g' /home/user/magic-pdf.json")
|
20 |
+
# os.system("sed -i 's|cpu|cuda|g' /home/user/magic-pdf.json")
|
21 |
|
22 |
import gradio as gr
|
23 |
from loguru import logger
|