VishalD1234 commited on
Commit
65ceb44
·
verified ·
1 Parent(s): 8caf7d1

Update app2.py

Browse files
Files changed (1) hide show
  1. app2.py +9 -9
app2.py CHANGED
@@ -12,14 +12,14 @@ 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
  DELAY_REASONS = {
15
- "step1": {"reasons": ["No raw material available", "Person repatching the tire"]},
16
- "step2": {"reasons": ["Person repatching the tire", "Lack of raw material"]},
17
- "step3": {"reasons": ["Person repatching the tire", "Lack of raw material"]},
18
- "step4": {"reasons": ["Person repatching the tire", "Lack of raw material"]},
19
- "step5": {"reasons": ["Person repatching the tire", "Lack of raw material"]},
20
- "step6": {"reasons": ["Person repatching the tire", "Lack of raw material"]},
21
- "step7": {"reasons": ["Person repatching the tire", "Lack of raw material"]},
22
- "step8": {"reasons": ["No person available to collect tire", "Person repatching the tire"]}
23
  }
24
 
25
  with open('delay_reasons.json', 'w') as f:
@@ -28,7 +28,7 @@ with open('delay_reasons.json', 'w') as f:
28
  def load_video(video_data, strategy='chat'):
29
  bridge.set_bridge('torch')
30
  mp4_stream = video_data
31
- num_frames = 24
32
  decord_vr = VideoReader(io.BytesIO(mp4_stream), ctx=cpu(0))
33
  frame_id_list = []
34
  total_frames = len(decord_vr)
 
12
  TORCH_TYPE = torch.bfloat16 if torch.cuda.is_available() and torch.cuda.get_device_capability()[0] >= 8 else torch.float16
13
 
14
  DELAY_REASONS = {
15
+ "step1": {"reasons": ["Delay in Bead Insertion","Lack of raw material"]},
16
+ "step2": {"reasons": ["Inner Liner Adjustment by Technician","Person rebuilding defective Tire Sections"]},
17
+ "step3": {"reasons": ["Manual Adjustment in Ply1 apply","Technician repairing defective Tire Sections"]},
18
+ "step4": {"reasons": ["Delay in Bead set","Lack of raw material"]},
19
+ "step5": {"reasons": ["Delay in Turnup","Lack of raw material"]},
20
+ "step6": {"reasons": ["Person Repairing sidewall","Person rebuilding defective Tire Sections"]},
21
+ "step7": {"reasons": ["Delay in sidewall stitching","Lack of raw material"]},
22
+ "step8": {"reasons": ["No person available to load Carcass","No person available to collect tire"]}
23
  }
24
 
25
  with open('delay_reasons.json', 'w') as f:
 
28
  def load_video(video_data, strategy='chat'):
29
  bridge.set_bridge('torch')
30
  mp4_stream = video_data
31
+ num_frames = 48
32
  decord_vr = VideoReader(io.BytesIO(mp4_stream), ctx=cpu(0))
33
  frame_id_list = []
34
  total_frames = len(decord_vr)