Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -451,13 +451,7 @@ def match_pdf_to_athlete(pdfs_data, athlete_name):
|
|
| 451 |
|
| 452 |
return None
|
| 453 |
|
| 454 |
-
matched_pdf = match_pdf_to_athlete(pdfs_data, selected_athlete)
|
| 455 |
-
|
| 456 |
-
st.write("Athlète CSV sélectionné :", selected_athlete)
|
| 457 |
|
| 458 |
-
for i, pdf in enumerate(pdfs_data):
|
| 459 |
-
st.write(f"PDF {i+1} - athlete_name extrait :", pdf.get("athlete_name"))
|
| 460 |
-
st.write(f"PDF {i+1} - source_pdf :", pdf.get("source_pdf"))
|
| 461 |
|
| 462 |
# =========================================================
|
| 463 |
# ANALYSE V3
|
|
@@ -1184,6 +1178,14 @@ if uploaded_pdfs:
|
|
| 1184 |
all_athletes = sorted(df_std["Nom"].dropna().unique().tolist())
|
| 1185 |
selected_athlete = st.selectbox("Athlète", all_athletes)
|
| 1186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1187 |
sub_df = df_std[df_std["Nom"] == selected_athlete].copy()
|
| 1188 |
if sub_df.empty:
|
| 1189 |
st.error("Aucune donnée trouvée pour cet athlète.")
|
|
@@ -1210,7 +1212,6 @@ poids_kg = st.number_input(
|
|
| 1210 |
|
| 1211 |
metrics = compute_profile_metrics(row, poids_kg)
|
| 1212 |
thresholds = compute_external_thresholds(poids_kg, volume_horaire)
|
| 1213 |
-
matched_pdf = match_pdf_to_athlete(pdfs_data, selected_athlete)
|
| 1214 |
|
| 1215 |
attaque_finale = metrics["attaque_csv"]
|
| 1216 |
if matched_pdf and matched_pdf.get("attaque_pdf") and matched_pdf["attaque_pdf"] != "indéterminée":
|
|
|
|
| 451 |
|
| 452 |
return None
|
| 453 |
|
|
|
|
|
|
|
|
|
|
| 454 |
|
|
|
|
|
|
|
|
|
|
| 455 |
|
| 456 |
# =========================================================
|
| 457 |
# ANALYSE V3
|
|
|
|
| 1178 |
all_athletes = sorted(df_std["Nom"].dropna().unique().tolist())
|
| 1179 |
selected_athlete = st.selectbox("Athlète", all_athletes)
|
| 1180 |
|
| 1181 |
+
matched_pdf = match_pdf_to_athlete(pdfs_data, selected_athlete)
|
| 1182 |
+
|
| 1183 |
+
st.write("Athlète CSV sélectionné :", selected_athlete)
|
| 1184 |
+
|
| 1185 |
+
for i, pdf in enumerate(pdfs_data):
|
| 1186 |
+
st.write(f"PDF {i+1} - athlete_name extrait :", pdf.get('athlete_name'))
|
| 1187 |
+
st.write(f"PDF {i+1} - source_pdf :", pdf.get('source_pdf'))
|
| 1188 |
+
|
| 1189 |
sub_df = df_std[df_std["Nom"] == selected_athlete].copy()
|
| 1190 |
if sub_df.empty:
|
| 1191 |
st.error("Aucune donnée trouvée pour cet athlète.")
|
|
|
|
| 1212 |
|
| 1213 |
metrics = compute_profile_metrics(row, poids_kg)
|
| 1214 |
thresholds = compute_external_thresholds(poids_kg, volume_horaire)
|
|
|
|
| 1215 |
|
| 1216 |
attaque_finale = metrics["attaque_csv"]
|
| 1217 |
if matched_pdf and matched_pdf.get("attaque_pdf") and matched_pdf["attaque_pdf"] != "indéterminée":
|