Update app.py
Browse files
app.py
CHANGED
@@ -79,7 +79,7 @@ def predict_return(selected_products, total_customer_purchases, total_customer_r
|
|
79 |
return "Error: No predictions found."
|
80 |
|
81 |
# Format the cart output
|
82 |
-
cart_output = "\n".join(descriptions) + f"\n\nTotal Cart Value: {total_value} USD"
|
83 |
|
84 |
# Format the prediction results
|
85 |
formatted_result = "\n".join([f"Product: {pred['product']} \t Prediction: {pred['prediction']} \t Confidence: {pred['confidence']}%" for pred in predictions])
|
@@ -91,8 +91,8 @@ def predict_return(selected_products, total_customer_purchases, total_customer_r
|
|
91 |
|
92 |
# Crea l'interfaccia Gradio con le checkbox a sinistra
|
93 |
checkbox_choices = [
|
94 |
-
f"{row['Item Brand Model']}-{row['Item Brand Fabric']}-{row['Item Brand Colour']}
|
95 |
-
f"
|
96 |
for _, row in inventory.iterrows()
|
97 |
]
|
98 |
|
|
|
79 |
return "Error: No predictions found."
|
80 |
|
81 |
# Format the cart output
|
82 |
+
cart_output = "\n".join(descriptions) + f"\n\nTotal Cart Value: {total_value.round(2)} USD"
|
83 |
|
84 |
# Format the prediction results
|
85 |
formatted_result = "\n".join([f"Product: {pred['product']} \t Prediction: {pred['prediction']} \t Confidence: {pred['confidence']}%" for pred in predictions])
|
|
|
91 |
|
92 |
# Crea l'interfaccia Gradio con le checkbox a sinistra
|
93 |
checkbox_choices = [
|
94 |
+
f"{row['Item Brand Model']}-{row['Item Brand Fabric']}-{row['Item Brand Colour']} "
|
95 |
+
f"\tType: {row['Product Type']} \tMaterial: {row['Main Material']} \tSales: {row['Net Sales (FA)'].round(2)} USD"
|
96 |
for _, row in inventory.iterrows()
|
97 |
]
|
98 |
|