Keshav-rejoice commited on
Commit
5407f1f
·
verified ·
1 Parent(s): 1fd97b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -88,12 +88,13 @@ if uploaded_file is not None:
88
 
89
  defects_string = class_name
90
  ai_prompt = (
91
- f"Our trained model predicts the following defect: {defects_string}. "
92
- f"Can you analyze the following image and generate AI-based descriptions "
93
- f"for this defect? The output format should be:\n"
94
- f"Category ID: <Category_ID>\n"
95
- f"Title: <Title>\n"
96
- f"Description: <description in 100 words or less>"
 
97
  )
98
 
99
  st.write("Analyzing image with AI...")
 
88
 
89
  defects_string = class_name
90
  ai_prompt = (
91
+ f"You are an AI image analysis assistant trained to classify and describe defects based on visual input."
92
+ f"A defect has been predicted by our model: {defects_string}."
93
+ f"Please analyze the provided image and generate a concise, AI-based description of the defect in the following structured format:"
94
+ f"Category ID: <Insert the most relevant defect category ID>"
95
+ f"Title: <Short and specific defect title>"
96
+ f"Description: <Brief explanation of the defect, its characteristics, and likely cause—100 words or less>"
97
+ f"Be accurate, domain-specific, and avoid generic phrases."
98
  )
99
 
100
  st.write("Analyzing image with AI...")