Spaces:
Runtime error
Runtime error
Commit
·
a0fc58d
1
Parent(s):
ec28592
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
from transformers import LayoutLMv2Processor, LayoutLMv2ForTokenClassification
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
+
os.system('pip install torch==1.8.0+cpu torchvision==0.9.0+cpu -f https://download.pytorch.org/whl/torch_stable.html')
|
4 |
+
os.system('pip install -q detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.8/index.html')
|
5 |
+
|
6 |
+
|
7 |
import gradio as gr
|
8 |
import numpy as np
|
9 |
from transformers import LayoutLMv2Processor, LayoutLMv2ForTokenClassification
|