ThapeloAndrewSindane commited on
Commit
8ac851b
·
verified ·
1 Parent(s): 1371b2a

looping through examples

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -220,9 +220,9 @@ def compute(sentences, version = 'v3'):
220
  for index, sent in enumerate(sentences):
221
 
222
  output = model_choice.predict(sent)
223
- output_label = output['label']
224
- output_prob = output['score']
225
- output_label_language = output['label']
226
  # output_label = output[0][0].split('__')[-1].replace('_Hans', '_Hani').replace('_Hant', '_Hani')
227
  # output_prob = max(min(output[1][0], 1), 0)
228
  # output_label_language = output_label.split('_')[0]
 
220
  for index, sent in enumerate(sentences):
221
 
222
  output = model_choice.predict(sent)
223
+ output_label = output[index]['label']
224
+ output_prob = output[index]['score']
225
+ output_label_language = output[index]['label']
226
  # output_label = output[0][0].split('__')[-1].replace('_Hans', '_Hani').replace('_Hant', '_Hani')
227
  # output_prob = max(min(output[1][0], 1), 0)
228
  # output_label_language = output_label.split('_')[0]