Spaces:
Runtime error
Runtime error
ashishraics
commited on
Commit
•
978f7b1
1
Parent(s):
4a6b1d2
update requirements
Browse files- app.py +5 -1
- requirements.txt +26 -4
app.py
CHANGED
@@ -16,7 +16,7 @@ from PIL import Image
|
|
16 |
import logging
|
17 |
import multiprocessing
|
18 |
total_threads=multiprocessing.cpu_count()
|
19 |
-
|
20 |
try:
|
21 |
import pke
|
22 |
logging.error("importing pke info")
|
@@ -26,6 +26,10 @@ except:
|
|
26 |
subprocess.run(['python3' ,'-m' ,'spacy' ,'download' ,'en'])
|
27 |
import pke
|
28 |
|
|
|
|
|
|
|
|
|
29 |
st.set_page_config( # Alternate names: setup_page, page, layout
|
30 |
layout="wide", # Can be "centered" or "wide". In the future also "dashboard", etc.
|
31 |
initial_sidebar_state="auto", # Can be "auto", "expanded", "collapsed"
|
|
|
16 |
import logging
|
17 |
import multiprocessing
|
18 |
total_threads=multiprocessing.cpu_count()
|
19 |
+
import onnxruntime as ort
|
20 |
try:
|
21 |
import pke
|
22 |
logging.error("importing pke info")
|
|
|
26 |
subprocess.run(['python3' ,'-m' ,'spacy' ,'download' ,'en'])
|
27 |
import pke
|
28 |
|
29 |
+
session_options_ort = ort.SessionOptions()
|
30 |
+
session_options_ort.intra_op_num_threads=1
|
31 |
+
session_options_ort.inter_op_num_threads=1
|
32 |
+
|
33 |
st.set_page_config( # Alternate names: setup_page, page, layout
|
34 |
layout="wide", # Can be "centered" or "wide". In the future also "dashboard", etc.
|
35 |
initial_sidebar_state="auto", # Can be "auto", "expanded", "collapsed"
|
requirements.txt
CHANGED
@@ -1,5 +1,27 @@
|
|
1 |
-
nltk~=3.7
|
2 |
regex~=2022.4.24
|
3 |
-
transformers~=4.
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
regex~=2022.4.24
|
2 |
+
transformers~=4.18.0
|
3 |
+
pip~=22.0.4
|
4 |
+
wheel~=0.36.2
|
5 |
+
scikit-learn~=1.0.2
|
6 |
+
joblib~=1.1.0
|
7 |
+
numpy~=1.22.3
|
8 |
+
scipy~=1.8.0
|
9 |
+
click~=8.1.3
|
10 |
+
tqdm~=4.64.0
|
11 |
+
requests~=2.27.1
|
12 |
+
pyparsing~=3.0.8
|
13 |
+
onnx~=1.11.0
|
14 |
+
PyYAML~=6.0
|
15 |
+
setuptools~=62.2.0
|
16 |
+
packaging~=21.3
|
17 |
+
torch~=1.11.0
|
18 |
+
six~=1.15.0
|
19 |
+
urllib3~=1.26.9
|
20 |
+
onnxruntime~=1.11.1
|
21 |
+
certifi~=2021.10.8
|
22 |
+
threadpoolctl~=3.1.0
|
23 |
+
idna~=3.3
|
24 |
+
tokenizers~=0.12.1
|
25 |
+
flatbuffers~=1.12
|
26 |
+
filelock~=3.6.0
|
27 |
+
sacremoses~=0.0.53
|