martinnnuez commited on
Commit
303cafa
1 Parent(s): d881f19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -20,11 +20,11 @@ def predict(features):
20
  preds = model.predict(X)
21
  return float(preds[0])
22
 
23
- def main(X1,X2):
24
  """request input, preprocess it and make prediction"""
25
  input_data = {
26
- "PU_DO": X1,
27
- "trip_distance": X2
28
  }
29
  features = prepare_features(input_data)
30
  pred = predict(features)
@@ -51,4 +51,4 @@ intf = gr.Interface(title = "New York taxi duration prediction",
51
  live=True,
52
  enable_queue=True
53
  )
54
- intf.launch()
 
20
  preds = model.predict(X)
21
  return float(preds[0])
22
 
23
+ def main(PU_DO,trip_distance):
24
  """request input, preprocess it and make prediction"""
25
  input_data = {
26
+ "PU_DO": PU_DO,
27
+ "trip_distance": trip_distance
28
  }
29
  features = prepare_features(input_data)
30
  pred = predict(features)
 
51
  live=True,
52
  enable_queue=True
53
  )
54
+ intf.launch(share=True)