Spaces:
Runtime error
Runtime error
updating layout
Browse files
app.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
import subprocess
|
| 3 |
import os
|
| 4 |
if os.getenv('SYSTEM') == 'spaces':
|
| 5 |
-
subprocess.call('pip install gradio==4.
|
| 6 |
subprocess.call('pip install -U openmim'.split())
|
| 7 |
subprocess.call('pip install python-dotenv'.split())
|
| 8 |
subprocess.call('pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113'.split())
|
|
@@ -269,16 +269,13 @@ def process_video(input_video, out_fps = 'auto', skip_frames = 5):
|
|
| 269 |
|
| 270 |
with gr.Blocks(theme=theme) as demo:
|
| 271 |
gr.Markdown("Alpha Demo of the Sharkpatrol Oceanlife Detector.")
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
#dashboard = gr.Image(label="Events")
|
| 281 |
-
output_video = gr.Video(label="Output Video")
|
| 282 |
with gr.Row():
|
| 283 |
paths = sorted(pathlib.Path('videos_example/').rglob('*.mp4'))
|
| 284 |
samples=[[path.as_posix()] for path in paths if 'raw_videos' in str(path)]
|
|
|
|
| 2 |
import subprocess
|
| 3 |
import os
|
| 4 |
if os.getenv('SYSTEM') == 'spaces':
|
| 5 |
+
subprocess.call('pip install gradio==4.29.0'.split())
|
| 6 |
subprocess.call('pip install -U openmim'.split())
|
| 7 |
subprocess.call('pip install python-dotenv'.split())
|
| 8 |
subprocess.call('pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113'.split())
|
|
|
|
| 269 |
|
| 270 |
with gr.Blocks(theme=theme) as demo:
|
| 271 |
gr.Markdown("Alpha Demo of the Sharkpatrol Oceanlife Detector.")
|
| 272 |
+
with gr.Row():
|
| 273 |
+
input_video = gr.File(label="Input",height=50)
|
| 274 |
+
output_video = gr.File(label="Output Video",height=50)
|
| 275 |
+
#.style(equal_height=True,height='25%'):
|
| 276 |
+
original_frames = gr.Image(label="Processed Frame") #.style( height=650)
|
| 277 |
+
#processed_frames = gr.Image(label="Shark Engine")
|
| 278 |
+
#dashboard = gr.Image(label="Events")
|
|
|
|
|
|
|
|
|
|
| 279 |
with gr.Row():
|
| 280 |
paths = sorted(pathlib.Path('videos_example/').rglob('*.mp4'))
|
| 281 |
samples=[[path.as_posix()] for path in paths if 'raw_videos' in str(path)]
|