Ankush commited on
Commit
690bbc9
·
1 Parent(s): 9abca10

Fix build: use tensorflow-cpu, CPU torch wheels, pin numpy<2.0, fix imageio.v2

Browse files
app/models/DEEP_STEGO/hide_image.py CHANGED
@@ -3,7 +3,7 @@ import tempfile
3
  import numpy as np
4
  from tensorflow.keras.models import load_model
5
  from PIL import Image
6
- import imageio
7
  from app.models.DEEP_STEGO.Utils.preprocessing import normalize_batch, denormalize_batch
8
 
9
  _MODEL_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'models', 'hide.h5')
 
3
  import numpy as np
4
  from tensorflow.keras.models import load_model
5
  from PIL import Image
6
+ import imageio.v2 as imageio
7
  from app.models.DEEP_STEGO.Utils.preprocessing import normalize_batch, denormalize_batch
8
 
9
  _MODEL_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'models', 'hide.h5')
app/models/DEEP_STEGO/reveal_image.py CHANGED
@@ -3,7 +3,7 @@ import tempfile
3
  import numpy as np
4
  from tensorflow.keras.models import load_model
5
  from PIL import Image
6
- import imageio
7
  from app.models.DEEP_STEGO.Utils.preprocessing import normalize_batch, denormalize_batch
8
 
9
  _MODEL_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'models', 'reveal.h5')
 
3
  import numpy as np
4
  from tensorflow.keras.models import load_model
5
  from PIL import Image
6
+ import imageio.v2 as imageio
7
  from app.models.DEEP_STEGO.Utils.preprocessing import normalize_batch, denormalize_batch
8
 
9
  _MODEL_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'models', 'reveal.h5')
requirements.txt CHANGED
@@ -1,10 +1,11 @@
1
- tensorflow
 
2
  torch
3
  torchvision
4
  opencv-python-headless
5
  Pillow
6
  pycryptodome
7
  huggingface_hub
8
- numpy
9
  imageio
10
  requests
 
1
+ --extra-index-url https://download.pytorch.org/whl/cpu
2
+ tensorflow-cpu
3
  torch
4
  torchvision
5
  opencv-python-headless
6
  Pillow
7
  pycryptodome
8
  huggingface_hub
9
+ numpy<2.0
10
  imageio
11
  requests