varshakolanu commited on
Commit
e050e00
·
verified ·
1 Parent(s): d24b209

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -67,7 +67,6 @@ def preprocess_data(data: Dict[str, Any]) -> pd.DataFrame:
67
  df['Actual_Completion_Date__c'] = pd.to_datetime(df['Actual_Completion_Date__c'])
68
  df['Actual_Completion_Year'] = df['Actual_Completion_Date__c'].dt.year
69
  df['Actual_Completion_Month'] = df['Actual_Completion_Date__c'].dt.month
70
- df['Actual_Completion_Day'] = df['Actual_Completion_Date__c'].dt.day
71
  df = df.drop(columns=['Actual_Completion_Date__c'])
72
 
73
  df = df[expected_fields]
@@ -216,7 +215,6 @@ iface = gr.Interface(
216
  ],
217
  title="Subcontractor Performance Score Calculator",
218
  description="Click the button to retrieve Vendor Log details from Salesforce, calculate performance scores, and generate a PDF report.",
219
- buttons=[gr.Button("Get Scores from Salesforce")]
220
  )
221
 
222
  # 6. Launch the Interface
@@ -225,4 +223,4 @@ if __name__ == "__main__":
225
  os.environ['SALESFORCE_USERNAME'] = 'scores@app.com' # Replace with your username
226
  os.environ['SALESFORCE_PASSWORD'] = 'Internal@1' # Replace with your password
227
  os.environ['SALESFORCE_SECURITY_TOKEN'] = 'NbUKcTx45azba5HEdntE9YAh' # Replace with your security token
228
- iface.launch()
 
67
  df['Actual_Completion_Date__c'] = pd.to_datetime(df['Actual_Completion_Date__c'])
68
  df['Actual_Completion_Year'] = df['Actual_Completion_Date__c'].dt.year
69
  df['Actual_Completion_Month'] = df['Actual_Completion_Date__c'].dt.month
 
70
  df = df.drop(columns=['Actual_Completion_Date__c'])
71
 
72
  df = df[expected_fields]
 
215
  ],
216
  title="Subcontractor Performance Score Calculator",
217
  description="Click the button to retrieve Vendor Log details from Salesforce, calculate performance scores, and generate a PDF report.",
 
218
  )
219
 
220
  # 6. Launch the Interface
 
223
  os.environ['SALESFORCE_USERNAME'] = 'scores@app.com' # Replace with your username
224
  os.environ['SALESFORCE_PASSWORD'] = 'Internal@1' # Replace with your password
225
  os.environ['SALESFORCE_SECURITY_TOKEN'] = 'NbUKcTx45azba5HEdntE9YAh' # Replace with your security token
226
+ iface.launch()