PrashanthB461 commited on
Commit
5d12cf8
·
verified ·
1 Parent(s): 21a75a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -138,9 +138,9 @@ def send_to_salesforce(violations, score, video_path):
138
  status = "Reviewed" # Update this based on the processing state
139
 
140
  # If you have a file or video, you can add it here as well
141
- # video_file_url = "http://path_to_video" # Replace with the actual URL or path if available
142
 
143
- # violations_details = "\n".join([f"Frame {v['frame']}: {v['violation']} (Confidence: {v['confidence']})" for v in violations])
144
 
145
  data = {
146
  'Site__c': site_name, # Replace with dynamic data
@@ -152,7 +152,7 @@ def send_to_salesforce(violations, score, video_path):
152
  'Violations_Details__c': violations_details,
153
  'Video_File__c': video_file_url, # Include the file URL here if you want to store the file
154
  # Optionally add a URL for the PDF report
155
- # 'PDF_Report_URL__c': "http://path_to_pdf_report" # Replace with actual PDF report URL if available
156
  }
157
 
158
  try:
 
138
  status = "Reviewed" # Update this based on the processing state
139
 
140
  # If you have a file or video, you can add it here as well
141
+ video_file_url = "http://path_to_video" # Replace with the actual URL or path if available
142
 
143
+ violations_details = "\n".join([f"Frame {v['frame']}: {v['violation']} (Confidence: {v['confidence']})" for v in violations])
144
 
145
  data = {
146
  'Site__c': site_name, # Replace with dynamic data
 
152
  'Violations_Details__c': violations_details,
153
  'Video_File__c': video_file_url, # Include the file URL here if you want to store the file
154
  # Optionally add a URL for the PDF report
155
+ 'PDF_Report_URL__c': "http://path_to_pdf_report" # Replace with actual PDF report URL if available
156
  }
157
 
158
  try: