Spaces:
Build error
Build error
taskswithcode
commited on
Commit
·
89ed471
1
Parent(s):
58c3691
Update app.py
Browse files
app.py
CHANGED
@@ -127,16 +127,14 @@ def inference(img):
|
|
127 |
}
|
128 |
)
|
129 |
object_list_str.append(
|
130 |
-
f"{predicted_label} - X:{int(x0)} Y: {int(y0)} Width {int(width)} Height: {int(height)}
|
131 |
)
|
132 |
|
133 |
-
|
134 |
-
# f"You are an intelligent image captioner. I will hand you the objects and their position, and you should give me a detailed description for the photo. In this photo we have the following objects\n{object_list_str}"
|
135 |
-
#)
|
136 |
|
137 |
return (
|
138 |
Image.fromarray(np.uint8(out.get_image())).convert("RGB"),
|
139 |
-
f"Imagine you are an intelligent image captioner
|
140 |
)
|
141 |
|
142 |
|
|
|
127 |
}
|
128 |
)
|
129 |
object_list_str.append(
|
130 |
+
f"{predicted_label} - X:{int(x0)} Y: {int(y0)} Width {int(width)} Height: {int(height)}|"
|
131 |
)
|
132 |
|
133 |
+
|
|
|
|
|
134 |
|
135 |
return (
|
136 |
Image.fromarray(np.uint8(out.get_image())).convert("RGB"),
|
137 |
+
f"Imagine you are an intelligent image captioner.\n For each object in a scene the X, Y coordinates and width, height are given below. Use them to describe in detail each object in the scene. In the end give an overall summary of scene\n{object_list_str}"
|
138 |
)
|
139 |
|
140 |
|