alexkueck commited on
Commit
65d6ec0
·
1 Parent(s): 9dcd8be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -32,7 +32,10 @@ def generate(text, history):
32
  temperature=0.6,
33
  )
34
  #zum Evaluieren:
35
- eval_result = evaluator.evaluate_strings(prediction=res.strip(), input=text, requires_reference=True)
 
 
 
36
  print ("eval_result:............ ")
37
  print(eval_result)
38
  return res.strip()
 
32
  temperature=0.6,
33
  )
34
  #zum Evaluieren:
35
+ # custom eli5 criteria
36
+ custom_criterion = {"eli5": "Is the output explained in a way that a 5 yeard old would unterstand it?"}
37
+
38
+ eval_result = evaluator.evaluate_strings(prediction=res.strip(), input=text, criteria=custom_criterion, requires_reference=True)
39
  print ("eval_result:............ ")
40
  print(eval_result)
41
  return res.strip()