Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -88,12 +88,13 @@ if uploaded_file is not None:
|
|
| 88 |
|
| 89 |
defects_string = class_name
|
| 90 |
ai_prompt = (
|
| 91 |
-
f"
|
| 92 |
-
f"
|
| 93 |
-
f"
|
| 94 |
-
f"Category ID: <
|
| 95 |
-
f"Title: <
|
| 96 |
-
f"Description: <
|
|
|
|
| 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...")
|