Omnibus commited on
Commit
fc61db7
·
1 Parent(s): 90dc561

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -111,8 +111,8 @@ def set_targ():
111
  return targ
112
 
113
  def proc0(img):
114
- global num
115
- num = []
116
  num1.append(0)
117
  global targ
118
  targ = []
@@ -122,11 +122,11 @@ def proc0(img):
122
  targ_lang.append(mylist[0])
123
 
124
  def proc1(img):
125
- num1.append(1)
126
- new_num=len(num1)-2
127
  num = new_num
128
  print (f"new_num: {new_num}")
129
  if int(num) <= (ser_len - 1):
 
130
  lang = f"{ocr_id[mylist[int(num)]]}"
131
  print(f"lang: {lang}")
132
  out = model1(img,lang)
@@ -151,11 +151,11 @@ def proc1(img):
151
  return (out_a, out_p)
152
 
153
  def proc2(img):
154
- num1.append(1)
155
- new_num=len(num1)-2
156
  num = new_num
157
  print (f"new_num: {new_num}")
158
  if int(num) <= (ser_len - 1):
 
159
  lang = f"{ocr_id[mylist[int(num)]]}"
160
  print(f"lang: {lang}")
161
  out = model2(img,lang)
@@ -177,11 +177,11 @@ def proc2(img):
177
  return (out_a, out_p)
178
 
179
  def proc3(img):
180
- num1.append(1)
181
- new_num=len(num1)-2
182
  num = new_num
183
  print (f"new_num: {new_num}")
184
  if int(num) <= (ser_len - 1):
 
185
  lang = f"{ocr_id[mylist[int(num)]]}"
186
  print(f"lang: {lang}")
187
  out = model3(img,lang)
@@ -203,11 +203,11 @@ def proc3(img):
203
  return (out_a, out_p)
204
 
205
  def proc4(img):
206
- num1.append(1)
207
- new_num=len(num1)-2
208
  num = new_num
209
  print (f"new_num: {new_num}")
210
  if int(num) <= (ser_len - 1):
 
211
  lang = f"{ocr_id[mylist[int(num)]]}"
212
  print(f"lang: {lang}")
213
  out = model4(img,lang)
@@ -229,11 +229,11 @@ def proc4(img):
229
  return (out_a, out_p)
230
 
231
  def proc5(img):
232
- num1.append(1)
233
- new_num=len(num1)-2
234
  num = new_num
235
  print (f"new_num: {new_num}")
236
  if int(num) <= (ser_len - 1):
 
237
  lang = f"{ocr_id[mylist[int(num)]]}"
238
  print(f"lang: {lang}")
239
  out = model5(img,lang)
 
111
  return targ
112
 
113
  def proc0(img):
114
+ global num1
115
+ num1 = []
116
  num1.append(0)
117
  global targ
118
  targ = []
 
122
  targ_lang.append(mylist[0])
123
 
124
  def proc1(img):
125
+ new_num=len(num1)-1
 
126
  num = new_num
127
  print (f"new_num: {new_num}")
128
  if int(num) <= (ser_len - 1):
129
+ num1.append(1)
130
  lang = f"{ocr_id[mylist[int(num)]]}"
131
  print(f"lang: {lang}")
132
  out = model1(img,lang)
 
151
  return (out_a, out_p)
152
 
153
  def proc2(img):
154
+ new_num=len(num1)-1
 
155
  num = new_num
156
  print (f"new_num: {new_num}")
157
  if int(num) <= (ser_len - 1):
158
+ num1.append(1)
159
  lang = f"{ocr_id[mylist[int(num)]]}"
160
  print(f"lang: {lang}")
161
  out = model2(img,lang)
 
177
  return (out_a, out_p)
178
 
179
  def proc3(img):
180
+ new_num=len(num1)-1
 
181
  num = new_num
182
  print (f"new_num: {new_num}")
183
  if int(num) <= (ser_len - 1):
184
+ num1.append(1)
185
  lang = f"{ocr_id[mylist[int(num)]]}"
186
  print(f"lang: {lang}")
187
  out = model3(img,lang)
 
203
  return (out_a, out_p)
204
 
205
  def proc4(img):
206
+ new_num=len(num1)-1
 
207
  num = new_num
208
  print (f"new_num: {new_num}")
209
  if int(num) <= (ser_len - 1):
210
+ num1.append(1)
211
  lang = f"{ocr_id[mylist[int(num)]]}"
212
  print(f"lang: {lang}")
213
  out = model4(img,lang)
 
229
  return (out_a, out_p)
230
 
231
  def proc5(img):
232
+ new_num=len(num1)-1
 
233
  num = new_num
234
  print (f"new_num: {new_num}")
235
  if int(num) <= (ser_len - 1):
236
+ num1.append(1)
237
  lang = f"{ocr_id[mylist[int(num)]]}"
238
  print(f"lang: {lang}")
239
  out = model5(img,lang)