teja141290 commited on
Commit
d119163
·
1 Parent(s): 691c981

Update: Prompt for consistency

Browse files
Files changed (1) hide show
  1. app/utils/llm_client.py +7 -9
app/utils/llm_client.py CHANGED
@@ -16,23 +16,21 @@ class GroqAnalyzer:
16
  base64_image = base64.b64encode(image_file.read()).decode()
17
 
18
  system_message = """You are a professional car damage assessment expert. Your task is to analyze car images and provide structured, consistent damage reports.
19
-
20
  Please follow these exact guidelines:
21
  1. Use only these severity levels: High, Medium, Low
22
  2. For status, use these terms: Damaged, Intact, Partially Visible, Potentially damaged
23
  3. For actions, use these categories: Replacement/Repair, Inspection, Inspection/Repair
24
- 4. Always assess these components if visible: Front Bumper, Hood, Grille, Headlights, Fenders
25
- 5. Provide a consistent summary format focusing on:
26
- - Main visible damage
27
- - Recommended immediate actions
28
- - Secondary inspection points
29
  """
30
 
31
- analysis_template = """Please analyze the car damage and provide the assessment in this exact format:
32
 
33
- [TABLE]
34
  Component | Status | Severity | Action Needed
35
- Follow with a structured table using | as separators.
 
 
 
36
 
37
  [SUMMARY]
38
  Start with "The image shows..." and describe:
 
16
  base64_image = base64.b64encode(image_file.read()).decode()
17
 
18
  system_message = """You are a professional car damage assessment expert. Your task is to analyze car images and provide structured, consistent damage reports.
19
+
20
  Please follow these exact guidelines:
21
  1. Use only these severity levels: High, Medium, Low
22
  2. For status, use these terms: Damaged, Intact, Partially Visible, Potentially damaged
23
  3. For actions, use these categories: Replacement/Repair, Inspection, Inspection/Repair
24
+ 4. Use your knowledge to identify and assess all visible and relevant car parts in the image.
 
 
 
 
25
  """
26
 
27
+ analysis_template = """Analyze the car image and fill out the following table for all visible and relevant car parts (not limited to the example list below):
28
 
 
29
  Component | Status | Severity | Action Needed
30
+
31
+ Example components: Front Bumper, Rear Bumper, Hood, Grille, Headlights, Fenders, Doors, Quarter Panels, Trunk, Roof, etc.
32
+
33
+ After the table, write a summary that ONLY references the same components and findings as in the table above. Do not mention any components or damage not present in the table.
34
 
35
  [SUMMARY]
36
  Start with "The image shows..." and describe: