Spaces:
Sleeping
Sleeping
Update model_evaluation.py
Browse files- model_evaluation.py +1 -1
model_evaluation.py
CHANGED
@@ -91,7 +91,7 @@ def generate_response_with_context(user_query, relevant_segment):
|
|
91 |
"""
|
92 |
try:
|
93 |
prompt = f"Thank you for your question! Here is an additional fact about your topic: {relevant_segment}"
|
94 |
-
max_tokens = len(tokenizer(prompt)['input_ids']) +
|
95 |
response = gpt_model(prompt, max_length=max_tokens, temperature=0.25)[0]['generated_text']
|
96 |
return clean_up_response(response, relevant_segment)
|
97 |
except Exception as e:
|
|
|
91 |
"""
|
92 |
try:
|
93 |
prompt = f"Thank you for your question! Here is an additional fact about your topic: {relevant_segment}"
|
94 |
+
max_tokens = len(tokenizer(prompt)['input_ids']) + 100
|
95 |
response = gpt_model(prompt, max_length=max_tokens, temperature=0.25)[0]['generated_text']
|
96 |
return clean_up_response(response, relevant_segment)
|
97 |
except Exception as e:
|