Spaces:
Runtime error
Runtime error
Commit
•
03cee35
1
Parent(s):
6f9105d
saved the image so that it wouldnt be needed to downloaded repeatedly
Browse files- load_model.py +1 -1
load_model.py
CHANGED
@@ -29,6 +29,7 @@ def load_image(image_path):
|
|
29 |
img = tf.io.read_file(image_path)
|
30 |
img = tf.io.decode_jpeg(img, channels=3)
|
31 |
img = tf.image.resize(img, IMAGE_SHAPE[:-1])
|
|
|
32 |
return img
|
33 |
|
34 |
def load_image_obj(img):
|
@@ -348,7 +349,6 @@ def build():
|
|
348 |
|
349 |
path = "model/captioner_weights"
|
350 |
load_model.load_weights(path)
|
351 |
-
print(load_model.simple_gen(image))
|
352 |
return load_model
|
353 |
|
354 |
# loaded_model = build()
|
|
|
29 |
img = tf.io.read_file(image_path)
|
30 |
img = tf.io.decode_jpeg(img, channels=3)
|
31 |
img = tf.image.resize(img, IMAGE_SHAPE[:-1])
|
32 |
+
pickle.dump(img, open("test_run_img", wb))
|
33 |
return img
|
34 |
|
35 |
def load_image_obj(img):
|
|
|
349 |
|
350 |
path = "model/captioner_weights"
|
351 |
load_model.load_weights(path)
|
|
|
352 |
return load_model
|
353 |
|
354 |
# loaded_model = build()
|