Spaces:
Sleeping
Sleeping
O S I H
commited on
Commit
·
c59422d
1
Parent(s):
f9a1561
update
Browse files- Dockerfile +1 -2
- api.py +2 -1
Dockerfile
CHANGED
|
@@ -8,8 +8,7 @@ ENV HF_HOME=/code/.cache/huggingface
|
|
| 8 |
COPY ./requirements.txt /code/requirements.txt
|
| 9 |
|
| 10 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 11 |
-
|
| 12 |
COPY . .
|
| 13 |
-
|
| 14 |
EXPOSE 5000
|
| 15 |
CMD ["python", "api.py"]
|
|
|
|
| 8 |
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"]
|
api.py
CHANGED
|
@@ -7,7 +7,8 @@ import io
|
|
| 7 |
app = Flask(__name__)
|
| 8 |
|
| 9 |
# Load the model
|
| 10 |
-
model = from_pretrained_keras("MissingBreath/recycle-garbage-model")
|
|
|
|
| 11 |
|
| 12 |
# Class labels
|
| 13 |
# class_labels = ['cardboard', 'glass', 'metal', 'paper', 'plastic', 'trash']
|
|
|
|
| 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']
|