molinari135 commited on
Commit
b2f3264
·
verified ·
1 Parent(s): 522deed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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.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])
@@ -92,7 +92,7 @@ def predict_return(selected_products, total_customer_purchases, total_customer_r
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
 
 
79
  return "Error: No predictions found."
80
 
81
  # Format the cart output
82
+ cart_output = "\n".join(descriptions) + f"\n\nTotal Cart Value: {round(total_value, 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])
 
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: {round(row['Net Sales (FA)'], 2)} USD"
96
  for _, row in inventory.iterrows()
97
  ]
98