vumichien commited on
Commit
dc9f5f5
1 Parent(s): 2b9ea7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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((128, 128))
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=(960, 640)), 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)
 
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)