Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,6 +39,11 @@ def predict(team, inning, venue, hits, errors, lob, runs, opp_team, opp_runs, op
|
|
39 |
if score[0] < 0:
|
40 |
score = np.clip(score[0], a_min=0, a_max=None)
|
41 |
return np.round(score,1)
|
|
|
|
|
|
|
|
|
|
|
42 |
return np.round(score[0],1)
|
43 |
|
44 |
def predict_2(team, inning, venue, hits, errors, lob, runs, opp_team, opp_runs, opp_hits):
|
@@ -76,6 +81,11 @@ def predict_2(team, inning, venue, hits, errors, lob, runs, opp_team, opp_runs,
|
|
76 |
if score[0] < 0:
|
77 |
score = np.clip(score[0], a_min=0, a_max=None)
|
78 |
return np.round(score,1)
|
|
|
|
|
|
|
|
|
|
|
79 |
return np.round(score[0],1)
|
80 |
|
81 |
team_names = ["Arizona Diamondbacks",
|
|
|
39 |
if score[0] < 0:
|
40 |
score = np.clip(score[0], a_min=0, a_max=None)
|
41 |
return np.round(score,1)
|
42 |
+
|
43 |
+
if score[0] < runs:
|
44 |
+
score = runs
|
45 |
+
return score
|
46 |
+
|
47 |
return np.round(score[0],1)
|
48 |
|
49 |
def predict_2(team, inning, venue, hits, errors, lob, runs, opp_team, opp_runs, opp_hits):
|
|
|
81 |
if score[0] < 0:
|
82 |
score = np.clip(score[0], a_min=0, a_max=None)
|
83 |
return np.round(score,1)
|
84 |
+
|
85 |
+
if score[0] < runs:
|
86 |
+
score = runs
|
87 |
+
return score
|
88 |
+
|
89 |
return np.round(score[0],1)
|
90 |
|
91 |
team_names = ["Arizona Diamondbacks",
|