VishalD1234 commited on
Commit
a01dc67
·
verified ·
1 Parent(s): aaa7f8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +47 -10
app.py CHANGED
@@ -12,16 +12,53 @@ DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'
12
  TORCH_TYPE = torch.bfloat16 if torch.cuda.is_available() and torch.cuda.get_device_capability()[0] >= 8 else torch.float16
13
 
14
 
15
- DELAY_REASONS = {
16
- "Step 1": ["Delay in Bead Insertion","Lack of raw material"],
17
- "Step 2": ["Inner Liner Adjustment by Technician","Person rebuilding defective Tire Sections"],
18
- "Step 3": ["Manual Adjustment in Ply1 apply","Technician repairing defective Tire Sections"],
19
- "Step 4": ["Delay in Bead set","Lack of raw material"],
20
- "Step 5": ["Delay in Turnup","Lack of raw material"],
21
- "Step 6": ["Person Repairing sidewall","Person rebuilding defective Tire Sections"],
22
- "Step 7": ["Delay in sidewall stitching","Lack of raw material"],
23
- "Step 8": ["No person available to load Carcass","No person available to collect tire"]
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
  def load_video(video_data, strategy='chat'):
27
  """Loads and processes video data into a format suitable for model input."""
 
12
  TORCH_TYPE = torch.bfloat16 if torch.cuda.is_available() and torch.cuda.get_device_capability()[0] >= 8 else torch.float16
13
 
14
 
15
+ def get_step_info(step_name):
16
+ """Returns detailed information about a manufacturing step."""
17
+ step_details = {
18
+ "Step 1": {
19
+ "Name": "Bead Insertion",
20
+ "Standard Time": "4 seconds",
21
+ "Analysis": "Observe the bead placement process. If the insertion exceeds 4 seconds, identify potential issues such as missing beads, technician errors, or machinery malfunction."
22
+ },
23
+ "Step 2": {
24
+ "Name": "Inner Liner Apply",
25
+ "Standard Time": "4 seconds",
26
+ "Analysis": "Check for manual intervention during the inner layer application. If adjustment is required, it may indicate improper alignment or issues with the layer material."
27
+ },
28
+ "Step 3": {
29
+ "Name": "Ply1 Apply",
30
+ "Standard Time": "4 seconds",
31
+ "Analysis": "Determine if the technician is manually adjusting the first ply. Manual intervention might suggest improper ply placement or machine misalignment."
32
+ },
33
+ "Step 4": {
34
+ "Name": "Bead Set",
35
+ "Standard Time": "8 seconds",
36
+ "Analysis": "Observe the bead setting process. Delays may result from bead misalignment, machine pauses, or lack of technician involvement."
37
+ },
38
+ "Step 5": {
39
+ "Name": "Turnup",
40
+ "Standard Time": "4 seconds",
41
+ "Analysis": "Examine the turnup step for any technician involvement or pauses in machine operation. Reasons for delays might include material misalignment or equipment issues."
42
+ },
43
+ "Step 6": {
44
+ "Name": "Sidewall Apply",
45
+ "Standard Time": "14 seconds",
46
+ "Analysis": "If a technician is repairing the sidewall, this may indicate material damage or improper initial application. Look for signs of excessive manual handling."
47
+ },
48
+ "Step 7": {
49
+ "Name": "Sidewall Stitching",
50
+ "Standard Time": "5 seconds",
51
+ "Analysis": "Observe the stitching process. Delays could occur due to machine speed inconsistencies or technician intervention for correction."
52
+ },
53
+ "Step 8": {
54
+ "Name": "Carcass Unload",
55
+ "Standard Time": "7 seconds",
56
+ "Analysis": "Ensure a technician is present for the carcass unload. If absent, note their return time and identify potential reasons for their absence."
57
+ }
58
+ }
59
+
60
+ return step_details.get(step_name, {"Error": "Invalid step name. Please provide a valid step number."})
61
+
62
 
63
  def load_video(video_data, strategy='chat'):
64
  """Loads and processes video data into a format suitable for model input."""