Update app.py
Browse files
app.py
CHANGED
|
@@ -18,6 +18,9 @@ def model():
|
|
| 18 |
|
| 19 |
inputs = image_processor(images=image, return_tensors="pt")
|
| 20 |
outputs = model(**inputs)
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
# convert outputs (bounding boxes and class logits) to Pascal VOC format (xmin, ymin, xmax, ymax)
|
| 23 |
target_sizes = torch.tensor([image.size[::-1]])
|
|
|
|
| 18 |
|
| 19 |
inputs = image_processor(images=image, return_tensors="pt")
|
| 20 |
outputs = model(**inputs)
|
| 21 |
+
|
| 22 |
+
# display image
|
| 23 |
+
st.image('http://images.cocodataset.org/val2017/000000039769.jpg', caption='Sunrise by the mountains')
|
| 24 |
|
| 25 |
# convert outputs (bounding boxes and class logits) to Pascal VOC format (xmin, ymin, xmax, ymax)
|
| 26 |
target_sizes = torch.tensor([image.size[::-1]])
|