Spaces:
Runtime error
Runtime error
Commit
·
b365b14
1
Parent(s):
5f69179
Update app.py
Browse fileschanging call function name
app.py
CHANGED
@@ -14,7 +14,7 @@ def custom_standardization(s):
|
|
14 |
|
15 |
model = build()
|
16 |
|
17 |
-
def
|
18 |
initial = model.word_to_index([['[START]']]) # (batch, sequence)
|
19 |
img_features = model.feature_extractor(image[tf.newaxis, ...])
|
20 |
|
@@ -38,7 +38,7 @@ def simple_gen(image, temperature=1):
|
|
38 |
def transcribes(image):
|
39 |
result = []
|
40 |
for t in [0,0.5,1]:
|
41 |
-
result.append(
|
42 |
return result
|
43 |
|
44 |
gr.interface(fn=transcribes,
|
|
|
14 |
|
15 |
model = build()
|
16 |
|
17 |
+
def single_transcribe(image, temperature=1):
|
18 |
initial = model.word_to_index([['[START]']]) # (batch, sequence)
|
19 |
img_features = model.feature_extractor(image[tf.newaxis, ...])
|
20 |
|
|
|
38 |
def transcribes(image):
|
39 |
result = []
|
40 |
for t in [0,0.5,1]:
|
41 |
+
result.append(single_transcribe(image, t))
|
42 |
return result
|
43 |
|
44 |
gr.interface(fn=transcribes,
|