VishalD1234 commited on
Commit
0cfa75b
·
verified ·
1 Parent(s): 4289557

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -20
app.py CHANGED
@@ -218,8 +218,11 @@ def get_analysis_prompt(step_number):
218
 
219
  step_name = step_info["Name"]
220
  standard_time = step_info["Standard Time"]
221
- analysis = step_info["Analysis"]
222
 
 
 
 
223
  return f"""
224
  You are an AI expert system specialized in analyzing manufacturing processes and identifying production delays in tire manufacturing. Your role is to accurately classify delay reasons based on visual evidence from production line footage.
225
  Task Context:
@@ -229,27 +232,12 @@ Carefully observe the video for visual cues indicating production interruption.
229
  - If no person is visible in any of the frames, the reason probably might be due to their absence.
230
  - If a person is visible in the video and is observed touching and modifying the layers of the tire, it indicates an issue with tire patching, and the person might be repairing it.
231
  - Compare observed evidence against the following possible delay reasons:
232
- - {analysis}
233
- Following are the subactivities needs to happen in this step.
234
-
235
- {get_step_info(step_number)}
236
-
237
  Please provide your output in the following format:
238
  Output:
239
- Delay in Bead Insertion
240
- Lack of raw material
241
- Inner Liner Adjustment by Technician
242
- Person rebuilding defective Tire Sections
243
- Manual Adjustment in Ply1 Apply
244
- Technician repairing defective Tire Sections
245
- Delay in Bead Set
246
- Delay in Turnup
247
- Person Repairing sidewall
248
- Person rebuilding defective Tire Sections
249
- Delay in Sidewall Stitching
250
- No person available to load Carcass
251
- No person available to collect tire
252
-
253
  1. **Selected Reason:** [State the most likely reason from the given options]
254
  2. **Visual Evidence:** [Describe specific visual cues that support your selection]
255
  3. **Reasoning:** [Explain why this reason best matches the observed evidence]
 
218
 
219
  step_name = step_info["Name"]
220
  standard_time = step_info["Standard Time"]
221
+ potential_delay_reasons = step_info.get("Potential_Delay_Reasons", [])
222
 
223
+ # Constructing the prompt dynamically with potential delay reasons
224
+ potential_reasons_text = "\n ".join(potential_delay_reasons)
225
+
226
  return f"""
227
  You are an AI expert system specialized in analyzing manufacturing processes and identifying production delays in tire manufacturing. Your role is to accurately classify delay reasons based on visual evidence from production line footage.
228
  Task Context:
 
232
  - If no person is visible in any of the frames, the reason probably might be due to their absence.
233
  - If a person is visible in the video and is observed touching and modifying the layers of the tire, it indicates an issue with tire patching, and the person might be repairing it.
234
  - Compare observed evidence against the following possible delay reasons:
235
+ {potential_reasons_text}
236
+ Following are the subactivities that need to happen in this step:
237
+ {get_step_info(step_number)["Video_substeps_expected"]}
 
 
238
  Please provide your output in the following format:
239
  Output:
240
+ {potential_reasons_text}
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  1. **Selected Reason:** [State the most likely reason from the given options]
242
  2. **Visual Evidence:** [Describe specific visual cues that support your selection]
243
  3. **Reasoning:** [Explain why this reason best matches the observed evidence]