AnsenH commited on
Commit
24860f2
·
1 Parent(s): 8ddf619

chore: update v1 layout

Browse files
Files changed (1) hide show
  1. app.py +13 -8
app.py CHANGED
@@ -20,26 +20,31 @@ with gr.Blocks() as demo:
20
  output_videos = gr.State([])
21
  moment_scores = gr.State([])
22
  gr.HTML("""<h2 align="center"> ✍️ Highlight Detection with MomentDETR </h2>""")
23
- with gr.Row():
24
- with gr.Blocks():
 
 
 
 
 
 
 
 
 
25
  with gr.Column():
26
- gr.HTML("""<h3 align="center"> Input Video </h3>""")
27
- input_video = gr.PlayableVideo()
28
  retrieval_text = gr.Textbox(
 
29
  placeholder="What should be highlighted?",
30
  visible=True
31
  )
32
  submit =gr.Button("Submit")
33
- with gr.Blocks():
34
- with gr.Column():
35
- gr.HTML("""<h3 align="center"> Highlight Videos </h3>""")
36
  display_score = gr.Markdown("### Moment Score: ")
37
  radio_button = gr.Radio(
38
  choices=[i for i in range(10)],
39
  label="Moments",
40
  value=0
41
  )
42
- playable_video = gr.PlayableVideo(visible=True)
43
 
44
  def update_video_player(radio_value, output_videos, moment_scores):
45
  return {
 
20
  output_videos = gr.State([])
21
  moment_scores = gr.State([])
22
  gr.HTML("""<h2 align="center"> ✍️ Highlight Detection with MomentDETR </h2>""")
23
+ with gr.Column():
24
+ with gr.Row():
25
+ with gr.Blocks():
26
+ with gr.Column():
27
+ gr.HTML("""<h3 align="center"> Input Video </h3>""")
28
+ input_video = gr.PlayableVideo()
29
+ with gr.Blocks():
30
+ with gr.Column():
31
+ gr.HTML("""<h3 align="center"> Highlight Videos </h3>""")
32
+ playable_video = gr.PlayableVideo()
33
+ with gr.Row():
34
  with gr.Column():
 
 
35
  retrieval_text = gr.Textbox(
36
+ label="Query text",
37
  placeholder="What should be highlighted?",
38
  visible=True
39
  )
40
  submit =gr.Button("Submit")
41
+ with gr.Column():
 
 
42
  display_score = gr.Markdown("### Moment Score: ")
43
  radio_button = gr.Radio(
44
  choices=[i for i in range(10)],
45
  label="Moments",
46
  value=0
47
  )
 
48
 
49
  def update_video_player(radio_value, output_videos, moment_scores):
50
  return {