AdarshRL commited on
Commit
6c5bb1b
·
verified ·
1 Parent(s): 113fa9c

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -50,11 +50,12 @@ def predict_batch():
50
 
51
  # Read the file into a DataFrame
52
  input_data = pd.read_csv(file)
 
 
53
  input_data = pipeline.transform(input_data)
54
  # Make predictions for the batch data:
55
  predictions = model.predict(input_data).tolist()
56
-
57
- id_list = input_data.Product_Id.values.tolist()
58
  output_dict = dict(zip(id_list, predictions))
59
 
60
  return output_dict
 
50
 
51
  # Read the file into a DataFrame
52
  input_data = pd.read_csv(file)
53
+ id_list = input_data.Product_Id.values.tolist()
54
+ # Transform the input using the same trained pipeline:
55
  input_data = pipeline.transform(input_data)
56
  # Make predictions for the batch data:
57
  predictions = model.predict(input_data).tolist()
58
+
 
59
  output_dict = dict(zip(id_list, predictions))
60
 
61
  return output_dict