Akash8150 commited on
Commit
3ea03df
·
1 Parent(s): 501a221

Fix: pin tensorflow-cpu==2.13.0 to match saved Keras 2.x model format

Browse files
Files changed (2) hide show
  1. Dockerfile +6 -2
  2. requirements-hf.txt +5 -4
Dockerfile CHANGED
@@ -1,4 +1,8 @@
1
- FROM python:3.10-slim
 
 
 
 
2
 
3
  # Set working directory
4
  WORKDIR /app
@@ -30,4 +34,4 @@ COPY templates/ ./templates/
30
  EXPOSE 7860
31
 
32
  # Run the Flask app
33
- CMD ["python", "app.py"]
 
1
+ FROM python:3.10-slim
2
+
3
+ # Suppress TensorFlow oneDNN warnings
4
+ ENV TF_ENABLE_ONEDNN_OPTS=0
5
+ ENV TF_CPP_MIN_LOG_LEVEL=2
6
 
7
  # Set working directory
8
  WORKDIR /app
 
34
  EXPOSE 7860
35
 
36
  # Run the Flask app
37
+ CMD ["python", "app.py"]
requirements-hf.txt CHANGED
@@ -1,5 +1,6 @@
1
- # Inference-only requirements for Hugging Face deployment
2
- tensorflow-cpu==2.15.0
3
- numpy==1.26.4
 
4
  flask==3.0.3
5
- pillow==10.3.0
 
1
+ # Inference-only requirements for Hugging Face deployment
2
+ # tensorflow 2.13 uses Keras 2.x which matches the saved .h5 model format
3
+ tensorflow-cpu==2.13.0
4
+ numpy==1.24.3
5
  flask==3.0.3
6
+ pillow==10.3.0