breezedeus commited on
Commit
117842d
1 Parent(s): d917a85

fix: when caching examples

Browse files
Files changed (1) hide show
  1. app.py +11 -7
app.py CHANGED
@@ -110,18 +110,22 @@ def recognize(
110
  return only_text, None
111
 
112
 
 
 
 
 
 
 
 
 
 
 
 
113
  def main():
114
  langs = list(LANGUAGES.keys())
115
  langs.sort(key=lambda x: x.lower())
116
 
117
  title = 'Demo'
118
- example_func = functools.partial(
119
- recognize,
120
- mfd_model_name='yolov7 (paid)',
121
- mfr_model_name='mfr-pro',
122
- rec_type='mixed',
123
- resized_shape=768,
124
- )
125
  examples = [
126
  [
127
  ['English'],
 
110
  return only_text, None
111
 
112
 
113
+ def example_func(lang_list, rec_type, image_file):
114
+ return recognize(
115
+ lang_list,
116
+ mfd_model_name='yolov7 (paid)',
117
+ mfr_model_name='mfr-pro (paid)',
118
+ rec_type=rec_type,
119
+ resized_shape=768,
120
+ image_file=image_file,
121
+ )
122
+
123
+
124
  def main():
125
  langs = list(LANGUAGES.keys())
126
  langs.sort(key=lambda x: x.lower())
127
 
128
  title = 'Demo'
 
 
 
 
 
 
 
129
  examples = [
130
  [
131
  ['English'],