keithhon commited on
Commit
64ee7f4
1 Parent(s): 56f164d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -43,11 +43,13 @@ def translation(source, target, text):
43
 
44
  end_time = time.time()
45
 
 
46
  output = output[0]['translation_text']
47
  result = {'inference_time': end_time - start_time,
48
  'source': source,
49
  'target': target,
50
- 'result': output}
 
51
  return result
52
 
53
 
 
43
 
44
  end_time = time.time()
45
 
46
+ score = output[0]['output']
47
  output = output[0]['translation_text']
48
  result = {'inference_time': end_time - start_time,
49
  'source': source,
50
  'target': target,
51
+ 'result': output,
52
+ 'score': score}
53
  return result
54
 
55