Spaces:
Runtime error
Runtime error
Update app2.py
Browse files
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": ["
|
| 16 |
-
"step2": {"reasons": ["
|
| 17 |
-
"step3": {"reasons": ["
|
| 18 |
-
"step4": {"reasons": ["
|
| 19 |
-
"step5": {"reasons": ["
|
| 20 |
-
"step6": {"reasons": ["Person
|
| 21 |
-
"step7": {"reasons": ["
|
| 22 |
-
"step8": {"reasons": ["No person available to
|
| 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 =
|
| 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)
|