Spaces:
Runtime error
Runtime error
Commit
·
b8e7778
1
Parent(s):
eb0524f
upd app.py / trying to convert the pil image to tensor
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ model = build()
|
|
16 |
|
17 |
def single_img_transcribe(image, temperature=1):
|
18 |
initial = model.word_to_index([['[START]']]) # (batch, sequence)
|
19 |
-
img_features = model.feature_extractor(image[tf.newaxis, ...])
|
20 |
|
21 |
tokens = initial # (batch, sequence)
|
22 |
for n in range(50):
|
|
|
16 |
|
17 |
def single_img_transcribe(image, temperature=1):
|
18 |
initial = model.word_to_index([['[START]']]) # (batch, sequence)
|
19 |
+
img_features = model.feature_extractor(tf.convert_to_tensor(image)[tf.newaxis, ...])
|
20 |
|
21 |
tokens = initial # (batch, sequence)
|
22 |
for n in range(50):
|