Spaces:
Running
Running
Commit
·
76f040f
1
Parent(s):
1139524
error fixed
Browse files- model/generate.py +11 -19
model/generate.py
CHANGED
@@ -667,26 +667,18 @@ def generate_test_cases_and_info(input_text: str) -> Dict[str, Any]:
|
|
667 |
def get_algorithm_reason(model_name: str) -> str:
|
668 |
"""Get explanation for algorithm selection"""
|
669 |
if model_name == "microsoft/DialoGPT-small":
|
670 |
-
return "Selected due to low memory availability; DialoGPT-small provides
|
|
|
671 |
elif model_name == "distilgpt2":
|
672 |
-
return "Selected for its balance between performance and low memory usage.
|
|
|
673 |
elif model_name == "gpt2":
|
674 |
-
return "Chosen for general-purpose text generation with moderate memory headroom
|
|
|
675 |
elif model_name is None:
|
676 |
-
return "Enhanced template-based generation selected due to memory constraints.
|
|
|
677 |
else:
|
678 |
-
return "Model selected based on optimal tradeoff between memory usage, language generation capability,
|
679 |
-
|
680 |
-
|
681 |
-
},
|
682 |
-
{
|
683 |
-
"title": "Invalid Password Login",
|
684 |
-
"description": "Verify that login fails with incorrect password",
|
685 |
-
"preconditions": ["Valid user account exists"],
|
686 |
-
"steps": [
|
687 |
-
"Navigate to login page",
|
688 |
-
"Enter valid username",
|
689 |
-
"Enter incorrect password",
|
690 |
-
"Click login button"
|
691 |
-
],
|
692 |
-
"expected": "Login
|
|
|
667 |
def get_algorithm_reason(model_name: str) -> str:
|
668 |
"""Get explanation for algorithm selection"""
|
669 |
if model_name == "microsoft/DialoGPT-small":
|
670 |
+
return ("Selected due to low memory availability; DialoGPT-small provides "
|
671 |
+
"conversational understanding in limited memory environments with enhanced context processing.")
|
672 |
elif model_name == "distilgpt2":
|
673 |
+
return ("Selected for its balance between performance and low memory usage. "
|
674 |
+
"Ideal for small environments needing causal language modeling with good text generation quality.")
|
675 |
elif model_name == "gpt2":
|
676 |
+
return ("Chosen for general-purpose text generation with moderate memory headroom "
|
677 |
+
"and superior language understanding capabilities.")
|
678 |
elif model_name is None:
|
679 |
+
return ("Enhanced template-based generation selected due to memory constraints. "
|
680 |
+
"Uses comprehensive pattern matching, requirement analysis, and structured test case templates for robust test coverage.")
|
681 |
else:
|
682 |
+
return ("Model selected based on optimal tradeoff between memory usage, language generation capability, "
|
683 |
+
"and test case quality requirements.")
|
684 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|