Spaces:
Runtime error
Runtime error
Hugo Lindgren
commited on
Commit
·
87f9277
1
Parent(s):
1d4b55c
sss
Browse files
app.py
CHANGED
|
@@ -53,8 +53,10 @@ def valuation_predictor(goals, assists, y_cards, r_cards,
|
|
| 53 |
|
| 54 |
df = fg.read()
|
| 55 |
df = df.drop(columns=["player_id", "date"])
|
| 56 |
-
df_present = pd.DataFrame(columns=["Player name", "League", "Goals", "Assists", "Yellow cards", "Red cards", "Minutes played", "Height (cm)", "Age", "Months left on contract", "Team made goals", "Team conceded goals", "Team clean sheets", "Actual market value (EUR)", "Model predicted market value (EUR)"])
|
| 57 |
|
|
|
|
|
|
|
|
|
|
| 58 |
for index, row in df.iterrows():
|
| 59 |
league = ""
|
| 60 |
if row['league_es1']:
|
|
@@ -87,9 +89,11 @@ for index, row in df.iterrows():
|
|
| 87 |
}
|
| 88 |
|
| 89 |
# Append new row to df_present
|
| 90 |
-
|
|
|
|
|
|
|
| 91 |
|
| 92 |
-
|
| 93 |
|
| 94 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 95 |
with gr.Row():
|
|
|
|
| 53 |
|
| 54 |
df = fg.read()
|
| 55 |
df = df.drop(columns=["player_id", "date"])
|
|
|
|
| 56 |
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
new_rows = []
|
| 60 |
for index, row in df.iterrows():
|
| 61 |
league = ""
|
| 62 |
if row['league_es1']:
|
|
|
|
| 89 |
}
|
| 90 |
|
| 91 |
# Append new row to df_present
|
| 92 |
+
new_rows.append(new_row)
|
| 93 |
+
|
| 94 |
+
#predicted_value = valuation_predictor()
|
| 95 |
|
| 96 |
+
df_present = pd.DataFrame(new_rows, columns=["Player name", "League", "Goals", "Assists", "Yellow cards", "Red cards", "Minutes played", "Height (cm)", "Age", "Months left on contract", "Team made goals", "Team conceded goals", "Team clean sheets", "Actual market value (EUR)", "Model predicted market value (EUR)"])
|
| 97 |
|
| 98 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 99 |
with gr.Row():
|