iisadia commited on
Commit
c4bd6b5
·
verified ·
1 Parent(s): 6600546

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -57,17 +57,17 @@ def call_groq_api(prompt):
57
  def analyze_requirement(requirement):
58
  # Use Mistral for classification and domain identification
59
  type_prompt = f"Classify the following requirement as Functional or Non-Functional:\n\n{requirement}\n\nType:"
60
- req_type = call_mistral_api(type_prompt)
61
 
62
  domain_prompt = f"Classify the domain for the following requirement (e.g., Bank, Healthcare, etc.):\n\n{requirement}\n\nDomain:"
63
- domain = call_mistral_api(domain_prompt)
64
 
65
  # Use Groq for defect analysis and rewriting
66
  defects_prompt = f"""Analyze the following requirement and identify ONLY MAJOR defects (e.g., Ambiguity, Incompleteness, etc.).
67
  If the requirement is clear and complete, respond with 'No defects.'
68
  Requirement: {requirement}
69
  Defects:"""
70
- defects = call_groq_api(defects_prompt)
71
 
72
  rewritten = rewrite_requirement(requirement, defects)
73
 
 
57
  def analyze_requirement(requirement):
58
  # Use Mistral for classification and domain identification
59
  type_prompt = f"Classify the following requirement as Functional or Non-Functional:\n\n{requirement}\n\nType:"
60
+ req_type = call_mistral_api(type_prompt).strip()
61
 
62
  domain_prompt = f"Classify the domain for the following requirement (e.g., Bank, Healthcare, etc.):\n\n{requirement}\n\nDomain:"
63
+ domain = call_mistral_api(domain_prompt).strip()
64
 
65
  # Use Groq for defect analysis and rewriting
66
  defects_prompt = f"""Analyze the following requirement and identify ONLY MAJOR defects (e.g., Ambiguity, Incompleteness, etc.).
67
  If the requirement is clear and complete, respond with 'No defects.'
68
  Requirement: {requirement}
69
  Defects:"""
70
+ defects = call_groq_api(defects_prompt).strip()
71
 
72
  rewritten = rewrite_requirement(requirement, defects)
73