Spaces:
Runtime error
Runtime error
Commit
·
bbc8b41
1
Parent(s):
03cee35
updated and running
Browse files- __pycache__/load_model.cpython-310.pyc +0 -0
- flagged/image/tmpv44ikkh4.png +0 -0
- flagged/log.csv +2 -0
- load_model.py +4 -4
- test_run_img +0 -0
__pycache__/load_model.cpython-310.pyc
ADDED
Binary file (10.1 kB). View file
|
|
flagged/image/tmpv44ikkh4.png
ADDED
![]() |
flagged/log.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
image,output 0,output 1,output 2,flag,username,timestamp
|
2 |
+
C:\Users\Acer\Desktop\img-cap-v3\my-image-captioner\flagged\image\tmpv44ikkh4.png,a soccer player in blue shirt is playing soccer,a boy in blue and blue shirt is on a field,the man wearing a blue shirt is standing while sitting on the grass,,,2023-04-27 18:49:43.257927
|
load_model.py
CHANGED
@@ -29,7 +29,6 @@ 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 |
-
pickle.dump(img, open("test_run_img", wb))
|
33 |
return img
|
34 |
|
35 |
def load_image_obj(img):
|
@@ -342,9 +341,10 @@ def build():
|
|
342 |
loss=masked_loss,
|
343 |
metrics=[masked_acc])
|
344 |
|
345 |
-
image_url = 'https://tensorflow.org/images/surf.jpg'
|
346 |
-
image_path = tf.keras.utils.get_file('surf.jpg', origin=image_url)
|
347 |
-
image = load_image(image_path)
|
|
|
348 |
print(load_model.simple_gen(image))
|
349 |
|
350 |
path = "model/captioner_weights"
|
|
|
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):
|
|
|
341 |
loss=masked_loss,
|
342 |
metrics=[masked_acc])
|
343 |
|
344 |
+
# image_url = 'https://tensorflow.org/images/surf.jpg'
|
345 |
+
# image_path = tf.keras.utils.get_file('surf.jpg', origin=image_url)
|
346 |
+
# image = load_image(image_path)
|
347 |
+
image = pickle.load(open("test_run_img", "rb"))
|
348 |
print(load_model.simple_gen(image))
|
349 |
|
350 |
path = "model/captioner_weights"
|
test_run_img
ADDED
Binary file (602 kB). View file
|
|