ak5005 commited on
Commit
c75b701
Β·
1 Parent(s): 22ee258

formality feedback

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -58,7 +58,7 @@ def response_generator(prompt):
58
  response = f"Your translation quality was {score(total_score)}\n\n"
59
 
60
  acc_s = acc["score"]
61
- response += f"\nYour accuracy score is {score(acc_s)}:\n"
62
 
63
  for error in acc["errors"]:
64
  response += f" - {error['message']}\n"
@@ -74,13 +74,13 @@ def response_generator(prompt):
74
  response += f" - {error['message']}\n"
75
 
76
  frm_s = frm["normalized"]
77
- response += f"\nYour formality score is {score(frm_s)}:\n"
78
 
79
  if frm["src_label"] != frm["trg_label"]:
80
  response += (
81
- f"\n Tone mismatch: "
82
  f"your translation is β€œ{frm['trg_label']}”\n"
83
- f"but likely should be β€œ{frm['src_label']}” "
84
  )
85
 
86
  lines = response.split("\n")
 
58
  response = f"Your translation quality was {score(total_score)}\n\n"
59
 
60
  acc_s = acc["score"]
61
+ response += f"\nYour accuracy score is {score(acc_s)}\n"
62
 
63
  for error in acc["errors"]:
64
  response += f" - {error['message']}\n"
 
74
  response += f" - {error['message']}\n"
75
 
76
  frm_s = frm["normalized"]
77
+ response += f"\nYour formality score is {score(frm_s)}\n"
78
 
79
  if frm["src_label"] != frm["trg_label"]:
80
  response += (
81
+ f"\n - Tone mismatch: "
82
  f"your translation is β€œ{frm['trg_label']}”\n"
83
+ f"but likely should be β€œ{frm['src_label']}”. "
84
  )
85
 
86
  lines = response.split("\n")