ParthCodes commited on
Commit
af645e0
·
1 Parent(s): c7b1abd

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -10,7 +10,7 @@ app.secret_key = "cricktech-abhi-2023"
10
  CORS(app)
11
 
12
  # Load the model
13
- model = joblib.load('cricket_world_cup_score_prediction_model.pkl')
14
 
15
 
16
  @app.route('/', methods=['GET'])
@@ -25,7 +25,7 @@ def prediction():
25
  batting_team = data.get('batting_team')
26
  bowling_team = data.get('bowling_team')
27
  score = score_predict(batting_team, bowling_team, runs=data.get('total_runs'), wickets=data.get('total_wickets'), overs=data.get('overs'), runs_last_5_overs=data.get('runs_last_5_overs'), wickets_last_5_overs=data.get('wickets_last_5_overs'))
28
- return score
29
 
30
 
31
  def score_predict(batting_team, bowling_team, runs, wickets, overs, runs_last_5_overs, wickets_last_5_overs):
 
10
  CORS(app)
11
 
12
  # Load the model
13
+ model = joblib.load('dataset/world/cricket_world_cup_score_prediction_model.pkl')
14
 
15
 
16
  @app.route('/', methods=['GET'])
 
25
  batting_team = data.get('batting_team')
26
  bowling_team = data.get('bowling_team')
27
  score = score_predict(batting_team, bowling_team, runs=data.get('total_runs'), wickets=data.get('total_wickets'), overs=data.get('overs'), runs_last_5_overs=data.get('runs_last_5_overs'), wickets_last_5_overs=data.get('wickets_last_5_overs'))
28
+ return {'success': True, 'prediction': str(score)}
29
 
30
 
31
  def score_predict(batting_team, bowling_team, runs, wickets, overs, runs_last_5_overs, wickets_last_5_overs):