nagasurendra commited on
Commit
509b124
·
verified ·
1 Parent(s): 27b8a22

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -72,6 +72,8 @@ def generate_custom_dish():
72
  data = request.form
73
  dish_name = data.get("name")
74
  description = data.get("description")
 
 
75
 
76
  if not dish_name or not description:
77
  return jsonify({"success": False, "error": "Both fields are required"}), 400
@@ -91,6 +93,8 @@ def generate_custom_dish():
91
  custom_dish = {
92
  'Name': dish_name,
93
  'Price__c': price,
 
 
94
  'Description__c': description,
95
  'Veg_NonVeg__c': category,
96
  'Total_Ordered__c': 0
@@ -108,6 +112,8 @@ def generate_custom_dish():
108
  'Name': dish_name,
109
  'Price__c': price,
110
  'Base_Price__c': price,
 
 
111
  'Quantity__c': 1, # Assuming a default quantity of 1 for the custom dish
112
  'Add_Ons__c': '', # Set Add_ons__c to empty
113
  'Add_Ons_Price__c': 0, # Set Add_Ons_Price__c to 0
 
72
  data = request.form
73
  dish_name = data.get("name")
74
  description = data.get("description")
75
+ item_image_url = "https://huggingface.co/spaces/nagasurendra/BiryaniHubflask30/resolve/main/static/customized.jpg"
76
+ item_image_url2 = "https://huggingface.co/spaces/nagasurendra/BiryaniHubflask30/resolve/main/static/customized1.jpg"
77
 
78
  if not dish_name or not description:
79
  return jsonify({"success": False, "error": "Both fields are required"}), 400
 
93
  custom_dish = {
94
  'Name': dish_name,
95
  'Price__c': price,
96
+ 'Image1__c': item_image_url2,
97
+ 'Image2__c': item_image_url,
98
  'Description__c': description,
99
  'Veg_NonVeg__c': category,
100
  'Total_Ordered__c': 0
 
112
  'Name': dish_name,
113
  'Price__c': price,
114
  'Base_Price__c': price,
115
+ 'Image1__c': item_image_url2,
116
+ 'Image2__c': item_image_url,
117
  'Quantity__c': 1, # Assuming a default quantity of 1 for the custom dish
118
  'Add_Ons__c': '', # Set Add_ons__c to empty
119
  'Add_Ons_Price__c': 0, # Set Add_Ons_Price__c to 0