nsa9 commited on
Commit
60d78ea
·
verified ·
1 Parent(s): 3351fcf

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -73,12 +73,12 @@ def predict_rental_price_batch():
73
  # Read the CSV file into a Pandas DataFrame
74
  input_data = pd.read_csv(file)
75
 
76
- # Make predictions for all properties in the DataFrame (get log_prices)
77
  predicted_sales = model.predict(input_data).tolist()
78
 
79
- # Create a dictionary of predictions with property IDs as keys
80
- property_ids = input_data['Product_Id'].tolist() # Assuming 'id' is the property ID column
81
- output_dict = dict(zip(property_ids, predicted_sales)) # Use actual prices
82
 
83
  # Return the predictions dictionary as a JSON response
84
  return output_dict
 
73
  # Read the CSV file into a Pandas DataFrame
74
  input_data = pd.read_csv(file)
75
 
76
+ # Make predictions for all properties in the DataFrame (get sales)
77
  predicted_sales = model.predict(input_data).tolist()
78
 
79
+ # Create a dictionary of predictions with product IDs as keys
80
+ product_ids = input_data['Product_Id'].tolist() # Assuming 'product_id' is the product ID column
81
+ output_dict = dict(zip(product_ids, predicted_sales)) # Use actual sales
82
 
83
  # Return the predictions dictionary as a JSON response
84
  return output_dict