Thien Tran commited on
Commit
bd97504
1 Parent(s): 9797cf5
Files changed (3) hide show
  1. README.md +1 -0
  2. app.py +0 -6
  3. requirements.txt +8 -4
README.md CHANGED
@@ -6,6 +6,7 @@ colorTo: green
6
  sdk: gradio
7
  app_file: app.py
8
  pinned: false
 
9
  ---
10
 
11
  # Configuration
 
6
  sdk: gradio
7
  app_file: app.py
8
  pinned: false
9
+ python_version: "3.9"
10
  ---
11
 
12
  # Configuration
app.py CHANGED
@@ -1,9 +1,3 @@
1
- import os
2
- os.system('pip install pyyaml==5.1')
3
- os.system('pip install torch==1.10.1+cpu torchvision==0.11.2+cpu -f https://download.pytorch.org/whl/cpu')
4
- os.system('pip install git+https://github.com/facebookresearch/detectron2.git')
5
- os.system('pip install pytesseract')
6
-
7
  import gradio as gr
8
  import numpy as np
9
  from transformers import LayoutLMv2Processor, LayoutLMv2ForTokenClassification
 
 
 
 
 
 
 
1
  import gradio as gr
2
  import numpy as np
3
  from transformers import LayoutLMv2Processor, LayoutLMv2ForTokenClassification
requirements.txt CHANGED
@@ -1,6 +1,10 @@
1
- gradio
 
 
2
  Pillow
3
  numpy
4
- datasets
5
- torch
6
- transformers
 
 
 
1
+ --index-url https://download.pytorch.org/whl/cpu
2
+ --extra-index-url https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.10/index.html
3
+ --extra-index-url https://pypi.org/simple
4
  Pillow
5
  numpy
6
+ torch==1.10.1+cpu
7
+ torchvision==0.11.2+cpu
8
+ transformers
9
+ detectron2
10
+ pytesseract