Spaces:
Sleeping
Sleeping
Kolumbus Lindh
commited on
Commit
·
d9faaf5
1
Parent(s):
027f91a
updates
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ def load_user_model(repo_id, model_file):
|
|
11 |
|
12 |
# Generate a response using the specified model and prompt
|
13 |
def generate_response(model, prompt):
|
14 |
-
response = model(prompt, max_tokens=
|
15 |
return response["choices"][0]["text"]
|
16 |
|
17 |
# Evaluate responses using the LoRA evaluation model
|
@@ -41,7 +41,7 @@ Response B: {response_b}
|
|
41 |
|
42 |
Evaluation Criteria: {criteria_list}
|
43 |
|
44 |
-
Please evaluate the responses based on the selected criteria. For each criterion, rate both responses on a scale from 1 to
|
45 |
"""
|
46 |
# Use the LoRA model to evaluate the responses
|
47 |
evaluation_response = lora_model.create_completion(
|
|
|
11 |
|
12 |
# Generate a response using the specified model and prompt
|
13 |
def generate_response(model, prompt):
|
14 |
+
response = model(prompt, max_tokens=512, temperature=0.5)
|
15 |
return response["choices"][0]["text"]
|
16 |
|
17 |
# Evaluate responses using the LoRA evaluation model
|
|
|
41 |
|
42 |
Evaluation Criteria: {criteria_list}
|
43 |
|
44 |
+
Please evaluate the responses based on the selected criteria. For each criterion, rate both responses on a scale from 1 to 4 and provide a justification. Finally, declare the winner (or 'draw' if they are equal).
|
45 |
"""
|
46 |
# Use the LoRA model to evaluate the responses
|
47 |
evaluation_response = lora_model.create_completion(
|