Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,8 +18,6 @@ def show_shoes(sizes, types, colors, shoelaces, genders):
|
|
18 |
Flag = True
|
19 |
shoe_code,shoe_name,shoe_company,shoe_sizes,shoe_colors,shoe_shoelaces,shoe_sexes,shoe_types = shoes_data.iloc[i].values
|
20 |
shoes = [shoe_sizes.split('-'), shoe_sexes.split('-'), shoe_colors.split('-'), shoe_types.split('-'), shoe_shoelaces.split('-')]
|
21 |
-
print(11111, shoe_code,shoe_name,shoe_company,shoe_sizes,shoe_colors,shoe_shoelaces,shoe_sexes,shoe_types)
|
22 |
-
print(22222, shoe_sizes.split('-'), shoe_sexes.split('-'), shoe_colors.split('-'), shoe_types.split('-'), shoe_shoelaces.split('-'))
|
23 |
for select_details, shoe_details in zip(selection, shoes):
|
24 |
if not select_details:
|
25 |
continue
|
@@ -31,8 +29,7 @@ def show_shoes(sizes, types, colors, shoelaces, genders):
|
|
31 |
if not Flag:
|
32 |
break
|
33 |
if Flag:
|
34 |
-
|
35 |
-
shoes_arr.append((f'./Img/{shoe_code}.jpg', f'Name: {shoe_name} -Code: {shoe_code} -Sizes: {shoe_sizes}'))
|
36 |
|
37 |
if len(shoes_arr)==0:
|
38 |
shoes_arr.append(('./Img/Empty.png', 'این کالا موجود نمی باشد'))
|
@@ -41,11 +38,11 @@ def show_shoes(sizes, types, colors, shoelaces, genders):
|
|
41 |
demo = gr.Interface(
|
42 |
fn=show_shoes,
|
43 |
inputs=[
|
44 |
-
gr.Dropdown(sizes, multiselect=True, label="sizes", info="لطفا اندازه پای خود را انتخاب کنید"),
|
45 |
gr.CheckboxGroup(type_list, label="types", info="لطفا نوع کفش دلخواه را انتخاب کنید"),
|
|
|
46 |
gr.CheckboxGroup(color_list, label="colors", info="لطفا رنگ کفش دلخواه را انتخاب کنید"),
|
47 |
gr.CheckboxGroup(shoelace_list, label="shoelaces", info="لطفا نوع بند کفش دلخواه را انتخاب کنید"),
|
48 |
-
gr.
|
49 |
],
|
50 |
outputs=gr.Gallery(label="Selected Shoes", columns=[2], allow_preview=True, preview=True, show_label=True),
|
51 |
)
|
|
|
18 |
Flag = True
|
19 |
shoe_code,shoe_name,shoe_company,shoe_sizes,shoe_colors,shoe_shoelaces,shoe_sexes,shoe_types = shoes_data.iloc[i].values
|
20 |
shoes = [shoe_sizes.split('-'), shoe_sexes.split('-'), shoe_colors.split('-'), shoe_types.split('-'), shoe_shoelaces.split('-')]
|
|
|
|
|
21 |
for select_details, shoe_details in zip(selection, shoes):
|
22 |
if not select_details:
|
23 |
continue
|
|
|
29 |
if not Flag:
|
30 |
break
|
31 |
if Flag:
|
32 |
+
shoes_arr.append((f'./Img/{shoe_code}.jpg', f'Name: {shoe_name} ***** Code: {shoe_code} ***** Sizes: {shoe_sizes}'))
|
|
|
33 |
|
34 |
if len(shoes_arr)==0:
|
35 |
shoes_arr.append(('./Img/Empty.png', 'این کالا موجود نمی باشد'))
|
|
|
38 |
demo = gr.Interface(
|
39 |
fn=show_shoes,
|
40 |
inputs=[
|
|
|
41 |
gr.CheckboxGroup(type_list, label="types", info="لطفا نوع کفش دلخواه را انتخاب کنید"),
|
42 |
+
gr.CheckboxGroup(sex_list, label="genders", info="لطفا جنسیت خود را انتخاب کنید"),
|
43 |
gr.CheckboxGroup(color_list, label="colors", info="لطفا رنگ کفش دلخواه را انتخاب کنید"),
|
44 |
gr.CheckboxGroup(shoelace_list, label="shoelaces", info="لطفا نوع بند کفش دلخواه را انتخاب کنید"),
|
45 |
+
gr.Dropdown(sizes, multiselect=True, label="sizes", info="لطفا اندازه پای خود را انتخاب کنید"),
|
46 |
],
|
47 |
outputs=gr.Gallery(label="Selected Shoes", columns=[2], allow_preview=True, preview=True, show_label=True),
|
48 |
)
|