Spaces:
Runtime error
Runtime error
Arijit-hazra
commited on
Commit
•
bfb6a0f
1
Parent(s):
b365b14
Update app.py
Browse filesresolving the error for directly calling the model, using .call()
app.py
CHANGED
@@ -20,7 +20,7 @@ def single_transcribe(image, temperature=1):
|
|
20 |
|
21 |
tokens = initial # (batch, sequence)
|
22 |
for n in range(50):
|
23 |
-
preds = model((img_features, tokens)).numpy() # (batch, sequence, vocab)
|
24 |
preds = preds[:,-1, :] #(batch, vocab)
|
25 |
if temperature==0:
|
26 |
next = tf.argmax(preds, axis=-1)[:, tf.newaxis] # (batch, 1)
|
|
|
20 |
|
21 |
tokens = initial # (batch, sequence)
|
22 |
for n in range(50):
|
23 |
+
preds = model.call((img_features, tokens)).numpy() # (batch, sequence, vocab)
|
24 |
preds = preds[:,-1, :] #(batch, vocab)
|
25 |
if temperature==0:
|
26 |
next = tf.argmax(preds, axis=-1)[:, tf.newaxis] # (batch, 1)
|