gopichandra commited on
Commit
d76c82a
·
verified ·
1 Parent(s): c239830

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -245,11 +245,11 @@ def export_to_salesforce(mode, entry_type, quantity, edited_df):
245
  query_conditions.append(f"Stage__c = '{stage}'")
246
 
247
  if query_conditions:
248
- query = f"SELECT Estimated_Price__c FROM Inventory_Management__c WHERE {' AND '.join(query_conditions)} LIMIT 1"
249
  response = sf.query(query)
250
 
251
  if response["records"]:
252
- price = response["records"][0].get("Estimated_Price__c", None)
253
  if price:
254
  price_message = f"The estimated price for the {product_name} with {model_name} at {stage} is ₹{price:,}."
255
  return f"{message}\n\n{price_message}"
@@ -370,4 +370,5 @@ def app():
370
  return demo
371
 
372
  if __name__ == "__main__":
373
- app().launch(share=True)
 
 
245
  query_conditions.append(f"Stage__c = '{stage}'")
246
 
247
  if query_conditions:
248
+ query = f"SELECT Price__c FROM Inventory_Management__c WHERE {' AND '.join(query_conditions)} LIMIT 1"
249
  response = sf.query(query)
250
 
251
  if response["records"]:
252
+ price = response["records"][0].get("Price__c", None)
253
  if price:
254
  price_message = f"The estimated price for the {product_name} with {model_name} at {stage} is ₹{price:,}."
255
  return f"{message}\n\n{price_message}"
 
370
  return demo
371
 
372
  if __name__ == "__main__":
373
+ app().launch(share=True)
374
+