Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -999,8 +999,18 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
|
|
| 999 |
if not all([name, contact_number, street_address, landmark, zip_code, emirate, reason]):
|
| 1000 |
return "You must provide your details to book an enquiry."
|
| 1001 |
else:
|
| 1002 |
-
|
| 1003 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1004 |
|
| 1005 |
# def get_current_weather(location: str, unit: str):
|
| 1006 |
# """
|
|
|
|
| 999 |
if not all([name, contact_number, street_address, landmark, zip_code, emirate, reason]):
|
| 1000 |
return "You must provide your details to book an enquiry."
|
| 1001 |
else:
|
| 1002 |
+
enquiry = requests.post("https://sustainai.tech/user/user_request_visit", json={
|
| 1003 |
+
"data":{
|
| 1004 |
+
"name": "User105",
|
| 1005 |
+
}
|
| 1006 |
+
})
|
| 1007 |
+
|
| 1008 |
+
if enquiry.status_code == 200:
|
| 1009 |
+
print(f"Booking enquiry for {name} with contact number {contact_number}.")
|
| 1010 |
+
return f"Booking enquiry for {name} with contact number {contact_number} successful!. We'll get back to you shortly!"
|
| 1011 |
+
else:
|
| 1012 |
+
print(f"Booking enquiry for {name} with contact number {contact_number}.")
|
| 1013 |
+
return f"Booking enquiry for {name} with contact number {contact_number} declined!. Please try again or Contact our support team"
|
| 1014 |
|
| 1015 |
# def get_current_weather(location: str, unit: str):
|
| 1016 |
# """
|