Spaces:
Configuration error
Configuration error
Add requirements file
Browse files- app.py +1 -7
- requirements.txt +93 -0
app.py
CHANGED
@@ -6,20 +6,14 @@ import gradio as gr
|
|
6 |
import tensorflow as tf
|
7 |
|
8 |
# For downloading the image.
|
9 |
-
import matplotlib.pyplot as plt
|
10 |
-
import tempfile
|
11 |
-
from six import BytesIO
|
12 |
-
|
13 |
# For drawing onto the image.
|
14 |
import numpy as np
|
15 |
from PIL import Image
|
16 |
from PIL import ImageColor
|
17 |
from PIL import ImageDraw
|
18 |
from PIL import ImageFont
|
19 |
-
from PIL import ImageOps
|
20 |
-
|
21 |
print("load model...")
|
22 |
-
detector = tf.saved_model.load("model")
|
23 |
|
24 |
|
25 |
def draw_bounding_box_on_image(image,
|
|
|
6 |
import tensorflow as tf
|
7 |
|
8 |
# For downloading the image.
|
|
|
|
|
|
|
|
|
9 |
# For drawing onto the image.
|
10 |
import numpy as np
|
11 |
from PIL import Image
|
12 |
from PIL import ImageColor
|
13 |
from PIL import ImageDraw
|
14 |
from PIL import ImageFont
|
|
|
|
|
15 |
print("load model...")
|
16 |
+
detector = tf.saved_model.load("model/saved_model")
|
17 |
|
18 |
|
19 |
def draw_bounding_box_on_image(image,
|
requirements.txt
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
absl-py==1.3.0
|
2 |
+
aiohttp==3.8.3
|
3 |
+
aiosignal==1.3.1
|
4 |
+
anyio==3.6.2
|
5 |
+
astunparse==1.6.3
|
6 |
+
async-timeout==4.0.2
|
7 |
+
attrs==22.1.0
|
8 |
+
bcrypt==4.0.1
|
9 |
+
cachetools==5.2.0
|
10 |
+
certifi==2022.9.24
|
11 |
+
cffi==1.15.1
|
12 |
+
charset-normalizer==2.1.1
|
13 |
+
click==8.1.3
|
14 |
+
contourpy==1.0.6
|
15 |
+
cryptography==38.0.4
|
16 |
+
cycler==0.11.0
|
17 |
+
decorator==5.1.1
|
18 |
+
fastapi==0.88.0
|
19 |
+
ffmpy==0.3.0
|
20 |
+
flatbuffers==22.11.23
|
21 |
+
fonttools==4.38.0
|
22 |
+
frozenlist==1.3.3
|
23 |
+
fsspec==2022.11.0
|
24 |
+
gast==0.4.0
|
25 |
+
google-auth==2.14.1
|
26 |
+
google-auth-oauthlib==0.4.6
|
27 |
+
google-pasta==0.2.0
|
28 |
+
gradio==3.11.0
|
29 |
+
grpcio==1.50.0
|
30 |
+
h11==0.12.0
|
31 |
+
h5py==3.7.0
|
32 |
+
httpcore==0.15.0
|
33 |
+
httpx==0.23.1
|
34 |
+
idna==3.4
|
35 |
+
importlib-metadata==5.1.0
|
36 |
+
Jinja2==3.1.2
|
37 |
+
keras==2.11.0
|
38 |
+
kiwisolver==1.4.4
|
39 |
+
libclang==14.0.6
|
40 |
+
linkify-it-py==1.0.3
|
41 |
+
Markdown==3.4.1
|
42 |
+
markdown-it-py==2.1.0
|
43 |
+
MarkupSafe==2.1.1
|
44 |
+
matplotlib==3.6.2
|
45 |
+
mdit-py-plugins==0.3.1
|
46 |
+
mdurl==0.1.2
|
47 |
+
multidict==6.0.2
|
48 |
+
numpy==1.23.5
|
49 |
+
oauthlib==3.2.2
|
50 |
+
opt-einsum==3.3.0
|
51 |
+
orjson==3.8.2
|
52 |
+
packaging==21.3
|
53 |
+
pandas==1.5.2
|
54 |
+
paramiko==2.12.0
|
55 |
+
pathlib==1.0.1
|
56 |
+
Pillow==9.3.0
|
57 |
+
protobuf==3.19.6
|
58 |
+
pyasn1==0.4.8
|
59 |
+
pyasn1-modules==0.2.8
|
60 |
+
pycparser==2.21
|
61 |
+
pycryptodome==3.16.0
|
62 |
+
pydantic==1.10.2
|
63 |
+
pydub==0.25.1
|
64 |
+
PyNaCl==1.5.0
|
65 |
+
pyparsing==3.0.9
|
66 |
+
python-dateutil==2.8.2
|
67 |
+
python-multipart==0.0.5
|
68 |
+
pytz==2022.6
|
69 |
+
PyYAML==6.0
|
70 |
+
requests==2.28.1
|
71 |
+
requests-oauthlib==1.3.1
|
72 |
+
rfc3986==1.5.0
|
73 |
+
rsa==4.9
|
74 |
+
six==1.16.0
|
75 |
+
sniffio==1.3.0
|
76 |
+
starlette==0.22.0
|
77 |
+
tensorboard==2.11.0
|
78 |
+
tensorboard-data-server==0.6.1
|
79 |
+
tensorboard-plugin-wit==1.8.1
|
80 |
+
tensorflow==2.11.0
|
81 |
+
tensorflow-estimator==2.11.0
|
82 |
+
tensorflow-io-gcs-filesystem==0.28.0
|
83 |
+
termcolor==2.1.1
|
84 |
+
typing-extensions==4.4.0
|
85 |
+
uc-micro-py==1.0.1
|
86 |
+
urllib3==1.26.13
|
87 |
+
uvicorn==0.20.0
|
88 |
+
validators==0.20.0
|
89 |
+
websockets==10.4
|
90 |
+
Werkzeug==2.2.2
|
91 |
+
wrapt==1.14.1
|
92 |
+
yarl==1.8.1
|
93 |
+
zipp==3.11.0
|