Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files- app.py +4 -6
- examples/Chtholly.png +0 -0
app.py
CHANGED
@@ -8,8 +8,7 @@ from numpy import random
|
|
8 |
|
9 |
from models.experimental import attempt_load
|
10 |
from utils.datasets import LoadImages
|
11 |
-
from utils.general import (
|
12 |
-
check_img_size, non_max_suppression, scale_coords, xyxy2xywh)
|
13 |
from utils.torch_utils import select_device
|
14 |
|
15 |
import gradio as gr
|
@@ -109,10 +108,9 @@ if __name__ == '__main__':
|
|
109 |
run_btn = gr.Button(variant="primary")
|
110 |
|
111 |
with gr.Row():
|
112 |
-
examples_data = [["examples/Eda.png"],["examples/Fairies.png"]]
|
113 |
-
examples = gr.
|
114 |
-
|
115 |
-
examples.click(lambda x: x[0], [examples], [input_img])
|
116 |
run_btn.click(run, [input_img, crop_mode, tgt_width, tgt_height, face_ratio, threshold], [output_img])
|
117 |
|
118 |
|
|
|
8 |
|
9 |
from models.experimental import attempt_load
|
10 |
from utils.datasets import LoadImages
|
11 |
+
from utils.general import (non_max_suppression, scale_coords, xyxy2xywh)
|
|
|
12 |
from utils.torch_utils import select_device
|
13 |
|
14 |
import gradio as gr
|
|
|
108 |
run_btn = gr.Button(variant="primary")
|
109 |
|
110 |
with gr.Row():
|
111 |
+
examples_data = [["examples/Eda.png"],["examples/Chtholly.png"],["examples/Fairies.png"]]
|
112 |
+
examples = gr.Examples(examples=examples_data,
|
113 |
+
inputs=input_img)
|
|
|
114 |
run_btn.click(run, [input_img, crop_mode, tgt_width, tgt_height, face_ratio, threshold], [output_img])
|
115 |
|
116 |
|
examples/Chtholly.png
ADDED