Arijit-hazra commited on
Commit
b365b14
·
1 Parent(s): 5f69179

Update app.py

Browse files

changing call function name

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,7 +14,7 @@ def custom_standardization(s):
14
 
15
  model = build()
16
 
17
- def simple_gen(image, temperature=1):
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(simple_gen(image, t))
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,