Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,7 +32,10 @@ def generate(text, history):
|
|
| 32 |
temperature=0.6,
|
| 33 |
)
|
| 34 |
#zum Evaluieren:
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
| 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()
|