Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -32,11 +32,24 @@ Product_Allocated_Area_Log = np.log1p(Product_Allocated_Area)
|
|
| 32 |
|
| 33 |
# Prepare JSON payload for the backend
|
| 34 |
product_data = {
|
| 35 |
-
"Age": str(
|
| 36 |
-
"current_occupation ":
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
# Trigger Prediction
|
| 39 |
-
if st.button("
|
| 40 |
try:
|
| 41 |
response = requests.post(
|
| 42 |
"https://HSSHETTY01-Extraa_Learns-backend2.hf.space/v1/predict",
|
|
|
|
| 32 |
|
| 33 |
# Prepare JSON payload for the backend
|
| 34 |
product_data = {
|
| 35 |
+
"Age": str(Age),
|
| 36 |
+
"current_occupation ":str( Current occupation),
|
| 37 |
+
"first_interaction": str(first_interaction),
|
| 38 |
+
"profile_completed": str(profile_completed),
|
| 39 |
+
"website_visits": str(website_visits),
|
| 40 |
+
"time_spent_on_website": str(time_spent_on_website),
|
| 41 |
+
"page_views_per_visit": str(page_views_per_visit),
|
| 42 |
+
"last_activity": str(last_activity),
|
| 43 |
+
"print_media_type1": print_media_type1,
|
| 44 |
+
"print_media_type2": print_media_type2,
|
| 45 |
+
"digital_media": str(digital_media),
|
| 46 |
+
"educational_channels": educational_channels,
|
| 47 |
+
"referral": referral
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
|
| 51 |
# Trigger Prediction
|
| 52 |
+
if st.button("status", type='primary'):
|
| 53 |
try:
|
| 54 |
response = requests.post(
|
| 55 |
"https://HSSHETTY01-Extraa_Learns-backend2.hf.space/v1/predict",
|