Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
print("Started")
|
| 2 |
import torch
|
| 3 |
import gradio as gr
|
| 4 |
import numpy as np
|
|
@@ -142,6 +141,21 @@ def create_interface():
|
|
| 142 |
frame_grid = gr.Image(label="Extracted Frames")
|
| 143 |
result_output = gr.Textbox(label="Model Output", lines=3)
|
| 144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
analyze_btn.click(
|
| 146 |
fn=predict_gas_pipe_quality,
|
| 147 |
inputs=video_input,
|
|
|
|
|
|
|
| 1 |
import torch
|
| 2 |
import gradio as gr
|
| 3 |
import numpy as np
|
|
|
|
| 141 |
frame_grid = gr.Image(label="Extracted Frames")
|
| 142 |
result_output = gr.Textbox(label="Model Output", lines=3)
|
| 143 |
|
| 144 |
+
gr.Examples(
|
| 145 |
+
examples=[
|
| 146 |
+
["13.mp4"],
|
| 147 |
+
["14.mp4"],
|
| 148 |
+
["04.mp4"],
|
| 149 |
+
["07_part1.mp4"],
|
| 150 |
+
["09_part1.mp4"],
|
| 151 |
+
["29_part1.mp4"]
|
| 152 |
+
],
|
| 153 |
+
inputs=video_input,
|
| 154 |
+
outputs=[frame_grid, result_output],
|
| 155 |
+
fn=predict_gas_pipe_quality,
|
| 156 |
+
cache_examples=False
|
| 157 |
+
)
|
| 158 |
+
|
| 159 |
analyze_btn.click(
|
| 160 |
fn=predict_gas_pipe_quality,
|
| 161 |
inputs=video_input,
|