mfarre HF staff commited on
Commit
75813eb
·
1 Parent(s): 1167d4f

initial test

Browse files
Files changed (2) hide show
  1. app.py +5 -4
  2. video_spec.json +9 -12
app.py CHANGED
@@ -91,22 +91,23 @@ def create_ui(examples_path: str):
91
  for example in examples_data["examples"]:
92
  with gr.Row():
93
  with gr.Column():
 
94
  gr.Video(
95
  value=example["original"]["url"],
96
  label=f"Original ({format_duration(example['original']['duration_seconds'])})",
97
  interactive=False
98
  )
99
- gr.Markdown(example["title"])
100
 
101
  with gr.Column():
 
 
 
102
  gr.Video(
103
  value=example["highlights"]["url"],
104
  label=f"Highlights ({format_duration(example['highlights']['duration_seconds'])})",
105
  interactive=False
106
  )
107
- with gr.Accordion("Analysis", open=False):
108
- gr.Markdown(example["analysis"]["video_description"])
109
- gr.Markdown(example["analysis"]["highlight_types"])
110
 
111
  gr.Markdown("## Try It Yourself!")
112
  with gr.Row():
 
91
  for example in examples_data["examples"]:
92
  with gr.Row():
93
  with gr.Column():
94
+ gr.Markdown(f"## {example["title"]}")
95
  gr.Video(
96
  value=example["original"]["url"],
97
  label=f"Original ({format_duration(example['original']['duration_seconds'])})",
98
  interactive=False
99
  )
 
100
 
101
  with gr.Column():
102
+ with gr.Accordion("Model chain of thought details", open=False):
103
+ gr.Markdown(example["analysis"]["video_description"])
104
+ gr.Markdown(example["analysis"]["highlight_types"])
105
  gr.Video(
106
  value=example["highlights"]["url"],
107
  label=f"Highlights ({format_duration(example['highlights']['duration_seconds'])})",
108
  interactive=False
109
  )
110
+
 
 
111
 
112
  gr.Markdown("## Try It Yourself!")
113
  with gr.Row():
video_spec.json CHANGED
@@ -11,8 +11,7 @@
11
  },
12
  "highlights": {
13
  "url": "https://huggingface.co/datasets/mfarre/servedfiles/resolve/main/barcamadridhighlights.mp4",
14
- "duration_seconds": 130,
15
- "thumbnail_url": "https://huggingface.co/datasets/mfarre/servedfiles/resolve/main/thumbnail_barcamadrid.png"
16
 
17
  },
18
  "analysis": {
@@ -22,21 +21,19 @@
22
  },
23
  {
24
  "id": "Example 2",
25
- "title": "Football Match Highlights",
26
- "description": "Champions League semifinal match",
27
  "original": {
28
- "url": "https://huggingface.co/datasets/mfarre/servedfiles/resolve/main/barcamadrid.mp4",
29
- "duration_seconds": 6114
30
  },
31
  "highlights": {
32
- "url": "https://huggingface.co/datasets/mfarre/servedfiles/resolve/main/barcamadridhighlights.mp4",
33
- "duration_seconds": 130,
34
- "thumbnail_url": "https://huggingface.co/datasets/mfarre/servedfiles/resolve/main/thumbnail_barcamadrid.png"
35
-
36
  },
37
  "analysis": {
38
- "video_description": "This is a high-stakes football match between Barcelona and Madrid.",
39
- "highlight_types": "- Goals scored\n- Player interactions\n- Vibe at the stadium"
40
  }
41
  },
42
  {
 
11
  },
12
  "highlights": {
13
  "url": "https://huggingface.co/datasets/mfarre/servedfiles/resolve/main/barcamadridhighlights.mp4",
14
+ "duration_seconds": 130
 
15
 
16
  },
17
  "analysis": {
 
21
  },
22
  {
23
  "id": "Example 2",
24
+ "title": "RedBull Rampage 2024",
25
+ "description": "The world’s toughest big mountain freeride mountain bike competition continues to progress the sport as the world’s top riders descend upon the rugged terrain of Virgin in Southwest Utah.",
26
  "original": {
27
+ "url": "https://huggingface.co/datasets/mfarre/servedfiles/resolve/main/rampage2024.mp4",
28
+ "duration_seconds": 10193
29
  },
30
  "highlights": {
31
+ "url": "https://huggingface.co/datasets/mfarre/servedfiles/resolve/main/rampage2024-highlights.mp4",
32
+ "duration_seconds": 800
 
 
33
  },
34
  "analysis": {
35
+ "video_description": "Freeride mountain bike competition",
36
+ "highlight_types": "Stunts: The video features riders performing impressive stunts, such as jumps, tricks, and flips, which are statistically rare and particularly dramatic. These segments should be highlighted to showcase the skill and athleticism of the riders.\nInteraction with the Crowd: The video shows riders interacting with the crowd, which is a unique aspect of the Red Bull Rampage event. This segment should be included to capture the excitement and energy of the crowd and the riders' interactions with them.\nBeing Interviewed: The video features riders being interviewed, which is another unique aspect of the Red Bull Rampage event. This segment should be included to showcase the riders' personalities, motivations, and experiences at the event.\nThe Red Bull Rampage Logo: The Red Bull Rampage logo is prominently displayed throughout the video, indicating the event's branding. This segment should be included to showcase the event's identity and branding."
37
  }
38
  },
39
  {