Vincent Claes commited on
Commit
717c8fd
1 Parent(s): 347714e

add examples

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -13,37 +13,37 @@ DEFAULT_MODEL = "microsoft/xclip-base-patch16-zero-shot"
13
  processor = AutoProcessor.from_pretrained(DEFAULT_MODEL)
14
  model = AutoModel.from_pretrained(DEFAULT_MODEL)
15
 
16
- ROOMS = (
17
  "bathroom,sauna,living room, bedroom,kitchen,toilet,hallway,dressing,attic,basement,home office,garage"
18
  )
19
  examples = [
20
  [
21
  "movies/bathroom.mp4",
22
- ROOMS,
23
  ],
24
  [
25
  "movies/bedroom.mp4",
26
- ROOMS,
27
  ],
28
  [
29
  "movies/dressing.mp4",
30
- ROOMS,
31
  ],
32
  [
33
  "movies/home-office.mp4",
34
- ROOMS,
35
  ],
36
  [
37
  "movies/kitchen.mp4",
38
- ROOMS,
39
  ],
40
  [
41
  "movies/living-room.mp4",
42
- ROOMS,
43
  ],
44
  [
45
  "movies/toilet.mp4",
46
- ROOMS,
47
  ],
48
  ]
49
 
@@ -118,7 +118,7 @@ with app:
118
  with gr.Row():
119
  with gr.Column():
120
  video_file = gr.Video(label="Video File:", show_label=True)
121
- local_video_labels_text = gr.Textbox(label="Labels Text:", show_label=True)
122
  submit_button = gr.Button(value="Predict")
123
  with gr.Column():
124
  predictions = gr.Label(label="Predictions:", show_label=True)
 
13
  processor = AutoProcessor.from_pretrained(DEFAULT_MODEL)
14
  model = AutoModel.from_pretrained(DEFAULT_MODEL)
15
 
16
+ ROOM_TYPES = (
17
  "bathroom,sauna,living room, bedroom,kitchen,toilet,hallway,dressing,attic,basement,home office,garage"
18
  )
19
  examples = [
20
  [
21
  "movies/bathroom.mp4",
22
+ ROOM_TYPES,
23
  ],
24
  [
25
  "movies/bedroom.mp4",
26
+ ROOM_TYPES,
27
  ],
28
  [
29
  "movies/dressing.mp4",
30
+ ROOM_TYPES,
31
  ],
32
  [
33
  "movies/home-office.mp4",
34
+ ROOM_TYPES,
35
  ],
36
  [
37
  "movies/kitchen.mp4",
38
+ ROOM_TYPES,
39
  ],
40
  [
41
  "movies/living-room.mp4",
42
+ ROOM_TYPES,
43
  ],
44
  [
45
  "movies/toilet.mp4",
46
+ ROOM_TYPES,
47
  ],
48
  ]
49
 
 
118
  with gr.Row():
119
  with gr.Column():
120
  video_file = gr.Video(label="Video File:", show_label=True)
121
+ local_video_labels_text = gr.Textbox(value=ROOM_TYPES,label="Room Types", show_label=True)
122
  submit_button = gr.Button(value="Predict")
123
  with gr.Column():
124
  predictions = gr.Label(label="Predictions:", show_label=True)