Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,14 @@ def main():
|
|
6 |
st.set_page_config(page_title="Unmasked the Target Customers", page_icon="🦜")
|
7 |
st.header("Turn the photos taken in the campaign to useful marketing insights")
|
8 |
uploaded_file = st.file_uploader("Select an Image...")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
def pipeline_1_final(image_lst):
|
11 |
pipe = pipeline("object-detection", model="hustvl/yolos-tiny")
|
|
|
6 |
st.set_page_config(page_title="Unmasked the Target Customers", page_icon="🦜")
|
7 |
st.header("Turn the photos taken in the campaign to useful marketing insights")
|
8 |
uploaded_file = st.file_uploader("Select an Image...")
|
9 |
+
|
10 |
+
|
11 |
+
# define a function to extract the sub-image using
|
12 |
+
def extract_subimage(image, xmin, xmax, ymin, ymax):
|
13 |
+
# crop the sub-image using the provided coordinates
|
14 |
+
sub_image = image.crop((xmin, ymin, xmax, ymax))
|
15 |
+
# return the extracted sub-image
|
16 |
+
return sub_image
|
17 |
|
18 |
def pipeline_1_final(image_lst):
|
19 |
pipe = pipeline("object-detection", model="hustvl/yolos-tiny")
|