Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def infer(image, last_seen):
|
|
32 |
box = xyxy.tolist()
|
33 |
area_rate = (box[2] - box[0]) * (box[3] - box[1]) / area_image
|
34 |
if area_rate >= most_close:
|
35 |
-
out_img = image.crop(tuple(box)).resize((
|
36 |
most_close = area_rate
|
37 |
if last_seen != "":
|
38 |
last_seen = base64_to_pil(last_seen)
|
@@ -46,7 +46,7 @@ def infer(image, last_seen):
|
|
46 |
iface = gr.Interface(
|
47 |
fn=infer,
|
48 |
title="aisatsu api",
|
49 |
-
inputs=[gr.Image(label="image", type="pil", shape=(
|
50 |
outputs=[gr.Image(label="output image"), gr.Textbox(label="output voice")],
|
51 |
article = "Author: <a href=\"https://huggingface.co/vumichien\">Vu Minh Chien</a>.",
|
52 |
).launch(enable_queue=True, debug=True)
|
|
|
32 |
box = xyxy.tolist()
|
33 |
area_rate = (box[2] - box[0]) * (box[3] - box[1]) / area_image
|
34 |
if area_rate >= most_close:
|
35 |
+
out_img = image.crop(tuple(box)).resize((64, 64))
|
36 |
most_close = area_rate
|
37 |
if last_seen != "":
|
38 |
last_seen = base64_to_pil(last_seen)
|
|
|
46 |
iface = gr.Interface(
|
47 |
fn=infer,
|
48 |
title="aisatsu api",
|
49 |
+
inputs=[gr.Image(label="image", type="pil", shape=(320, 320)), gr.Textbox(label="last seen", value="")],
|
50 |
outputs=[gr.Image(label="output image"), gr.Textbox(label="output voice")],
|
51 |
article = "Author: <a href=\"https://huggingface.co/vumichien\">Vu Minh Chien</a>.",
|
52 |
).launch(enable_queue=True, debug=True)
|