DHEIVER commited on
Commit
00f8749
·
1 Parent(s): d841b94

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -39,17 +39,19 @@ def classify_image_with_overlay(img):
39
  # Put the label text on the white rectangle
40
  cv2.putText(image, label, org, font, font_scale, (0, 0, 0), thickness, cv2.LINE_AA)
41
 
 
 
 
42
  return image
43
 
44
  iface = gr.Interface(
45
  fn=classify_image_with_overlay,
46
  inputs=gr.inputs.Image(),
47
- outputs=gr.outputs.Image(type="numpy", output_width=400, output_height=400), # Ajuste o tamanho da saída desejado
48
  live=True,
49
  title="ViT Image Classifier with Overlay",
50
  description="Upload an image for classification with label overlay.",
51
  )
52
 
53
-
54
  if __name__ == "__main__":
55
  iface.launch()
 
39
  # Put the label text on the white rectangle
40
  cv2.putText(image, label, org, font, font_scale, (0, 0, 0), thickness, cv2.LINE_AA)
41
 
42
+ # Resize the image to a larger size
43
+ image = cv2.resize(image, (800, 800)) # Defina o tamanho desejado aqui
44
+
45
  return image
46
 
47
  iface = gr.Interface(
48
  fn=classify_image_with_overlay,
49
  inputs=gr.inputs.Image(),
50
+ outputs=gr.outputs.Image(type="numpy"),
51
  live=True,
52
  title="ViT Image Classifier with Overlay",
53
  description="Upload an image for classification with label overlay.",
54
  )
55
 
 
56
  if __name__ == "__main__":
57
  iface.launch()