piperod commited on
Commit
780307f
1 Parent(s): 9f85afd

new layout

Browse files
Files changed (1) hide show
  1. app.py +14 -13
app.py CHANGED
@@ -70,6 +70,19 @@ def show_video(example: list) -> dict:
70
 
71
  with gr.Blocks(title='Shark Patrol',theme=gr.themes.Soft(),live=True,) as demo:
72
  gr.Markdown("Initial DEMO.")
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  with gr.Tab("Shark Detector"):
74
  with gr.Row():
75
  video_input = gr.Video(source='upload',include_audio=False)
@@ -90,19 +103,7 @@ with gr.Blocks(title='Shark Patrol',theme=gr.themes.Soft(),live=True,) as demo:
90
  inputs=example_images,
91
  outputs=video_input)
92
 
93
- with gr.Accordion("Current Detections"):
94
-
95
- with gr.Row():
96
- video_example = gr.Video(source='upload',include_audio=False,stream=True)
97
- with gr.Row():
98
- paths = sorted(pathlib.Path('videos_example/').rglob('*rgb.mp4'))
99
- example_preds = gr.Dataset(components=[video_example],
100
- samples=[[path.as_posix()]
101
- for path in paths])
102
- example_preds.click(fn=show_video,
103
- inputs=example_preds,
104
- outputs=video_example)
105
-
106
 
107
  demo.queue()
108
  #if os.getenv('SYSTEM') == 'spaces':
 
70
 
71
  with gr.Blocks(title='Shark Patrol',theme=gr.themes.Soft(),live=True,) as demo:
72
  gr.Markdown("Initial DEMO.")
73
+ with gr.Tab("Current Detections"):
74
+
75
+ with gr.Row():
76
+ video_example = gr.Video(source='upload',include_audio=False,stream=True)
77
+ with gr.Row():
78
+ paths = sorted(pathlib.Path('videos_example/').rglob('*rgb.mp4'))
79
+ example_preds = gr.Dataset(components=[video_example],
80
+ samples=[[path.as_posix()]
81
+ for path in paths])
82
+ example_preds.click(fn=show_video,
83
+ inputs=example_preds,
84
+ outputs=video_example)
85
+
86
  with gr.Tab("Shark Detector"):
87
  with gr.Row():
88
  video_input = gr.Video(source='upload',include_audio=False)
 
103
  inputs=example_images,
104
  outputs=video_input)
105
 
106
+
 
 
 
 
 
 
 
 
 
 
 
 
107
 
108
  demo.queue()
109
  #if os.getenv('SYSTEM') == 'spaces':