Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -111,26 +111,40 @@ def process_image(image, project_name):
|
|
| 111 |
completion_details = {
|
| 112 |
"Planning": {
|
| 113 |
"completed": [
|
| 114 |
-
"
|
|
|
|
|
|
|
| 115 |
],
|
| 116 |
"not_completed": [
|
| 117 |
-
"Detailed plans
|
|
|
|
|
|
|
| 118 |
]
|
| 119 |
},
|
| 120 |
"Foundation": {
|
| 121 |
"completed": [
|
| 122 |
-
"
|
|
|
|
|
|
|
|
|
|
| 123 |
],
|
| 124 |
"not_completed": [
|
| 125 |
-
"Plumbing
|
|
|
|
|
|
|
| 126 |
]
|
| 127 |
},
|
| 128 |
"Walls Erected": {
|
| 129 |
"completed": [
|
| 130 |
-
"
|
|
|
|
|
|
|
|
|
|
| 131 |
],
|
| 132 |
"not_completed": [
|
| 133 |
-
"Roofing
|
|
|
|
|
|
|
| 134 |
]
|
| 135 |
},
|
| 136 |
"Completed": {
|
|
@@ -152,7 +166,7 @@ def process_image(image, project_name):
|
|
| 152 |
not_completed_work = "\n".join([f"{idx+1}. {task}" for idx, task in enumerate(completion_details[milestone]["not_completed"])])
|
| 153 |
|
| 154 |
# Adjust the current time to local timezone
|
| 155 |
-
local_time = datetime.now(local_timezone).strftime("%Y-%m
|
| 156 |
|
| 157 |
# Create the Salesforce record with the image URL and AI prediction
|
| 158 |
record = {
|
|
|
|
| 111 |
completion_details = {
|
| 112 |
"Planning": {
|
| 113 |
"completed": [
|
| 114 |
+
"Initial project outline and objectives have been established.",
|
| 115 |
+
"Preliminary designs and architectural plans are drafted.",
|
| 116 |
+
"Stakeholder meetings and initial approvals are completed."
|
| 117 |
],
|
| 118 |
"not_completed": [
|
| 119 |
+
"Detailed construction plans and blueprints are pending finalization.",
|
| 120 |
+
"Permits and regulatory approvals are yet to be obtained.",
|
| 121 |
+
"Contractor selection and procurement processes are not yet complete."
|
| 122 |
]
|
| 123 |
},
|
| 124 |
"Foundation": {
|
| 125 |
"completed": [
|
| 126 |
+
"Site preparation, including clearing and leveling, is finished.",
|
| 127 |
+
"Excavation for the foundation has been completed.",
|
| 128 |
+
"Concrete pouring for the foundation, including footings and slabs, is done.",
|
| 129 |
+
"Initial structural inspections for the foundation have been passed."
|
| 130 |
],
|
| 131 |
"not_completed": [
|
| 132 |
+
"Plumbing and electrical groundwork installations are pending.",
|
| 133 |
+
"Backfilling and site grading around the foundation are not yet done.",
|
| 134 |
+
"Above-ground structural work, such as columns and walls, has not started."
|
| 135 |
]
|
| 136 |
},
|
| 137 |
"Walls Erected": {
|
| 138 |
"completed": [
|
| 139 |
+
"The concrete framework, including columns and beams, is in place.",
|
| 140 |
+
"All structural walls have been erected and stabilized.",
|
| 141 |
+
"Temporary scaffolding and safety measures are installed for ongoing work.",
|
| 142 |
+
"Initial inspections for structural integrity have been completed."
|
| 143 |
],
|
| 144 |
"not_completed": [
|
| 145 |
+
"Roofing installation and weatherproofing are pending.",
|
| 146 |
+
"Windows, doors, and exterior cladding are not yet installed.",
|
| 147 |
+
"Interior walls, electrical, and plumbing systems are still to be implemented."
|
| 148 |
]
|
| 149 |
},
|
| 150 |
"Completed": {
|
|
|
|
| 166 |
not_completed_work = "\n".join([f"{idx+1}. {task}" for idx, task in enumerate(completion_details[milestone]["not_completed"])])
|
| 167 |
|
| 168 |
# Adjust the current time to local timezone
|
| 169 |
+
local_time = datetime.now(local_timezone).strftime("%Y-%m-dT%H:%M:%S%z") # Corrected ISO 8601 format with timezone
|
| 170 |
|
| 171 |
# Create the Salesforce record with the image URL and AI prediction
|
| 172 |
record = {
|