Spaces:
Sleeping
Sleeping
O S I H
commited on
Commit
·
8be214a
1
Parent(s):
2484e86
trying gdown
Browse files- Dockerfile +5 -1
- api.py +3 -2
- requirements.txt +2 -1
Dockerfile
CHANGED
@@ -9,6 +9,10 @@ COPY ./requirements.txt /code/requirements.txt
|
|
9 |
|
10 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
COPY . .
|
12 |
-
RUN git clone https://huggingface.co/MissingBreath/recycle-garbage-model
|
|
|
|
|
|
|
|
|
13 |
EXPOSE 5000
|
14 |
CMD ["python", "api.py"]
|
|
|
9 |
|
10 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
COPY . .
|
12 |
+
# RUN git clone https://huggingface.co/MissingBreath/recycle-garbage-model
|
13 |
+
|
14 |
+
# RUN pip install gdown
|
15 |
+
RUN gdown 1-2xLqBeuq6ypWyPEVdfslKU1GLgD9a1_
|
16 |
+
|
17 |
EXPOSE 5000
|
18 |
CMD ["python", "api.py"]
|
api.py
CHANGED
@@ -3,13 +3,14 @@ from huggingface_hub import from_pretrained_keras
|
|
3 |
import numpy as np
|
4 |
from PIL import Image
|
5 |
import io
|
|
|
6 |
|
7 |
app = Flask(__name__)
|
8 |
|
9 |
# Load the model
|
10 |
# model = from_pretrained_keras("MissingBreath/recycle-garbage-model")
|
11 |
-
model = from_pretrained_keras("./recycle-garbage-model")
|
12 |
-
|
13 |
# Class labels
|
14 |
# class_labels = ['cardboard', 'glass', 'metal', 'paper', 'plastic', 'trash']
|
15 |
|
|
|
3 |
import numpy as np
|
4 |
from PIL import Image
|
5 |
import io
|
6 |
+
import tensorflow as tf
|
7 |
|
8 |
app = Flask(__name__)
|
9 |
|
10 |
# Load the model
|
11 |
# model = from_pretrained_keras("MissingBreath/recycle-garbage-model")
|
12 |
+
# model = from_pretrained_keras("./recycle-garbage-model")
|
13 |
+
model = tf.keras.models.load_model('_9217')
|
14 |
# Class labels
|
15 |
# class_labels = ['cardboard', 'glass', 'metal', 'paper', 'plastic', 'trash']
|
16 |
|
requirements.txt
CHANGED
@@ -3,4 +3,5 @@ numpy
|
|
3 |
pillow
|
4 |
huggingface_hub
|
5 |
tensorflow==2.15.0
|
6 |
-
keras==2.15.0
|
|
|
|
3 |
pillow
|
4 |
huggingface_hub
|
5 |
tensorflow==2.15.0
|
6 |
+
keras==2.15.0
|
7 |
+
gdown==5.1.0
|