modif app pour recéuperer dernier version du modele
Browse files90 unmodified lines9192939495969790 unmodified linesdef latest_model(bucket:str, prefix: str):response = s3.list_objects_v2(Bucket=bucket, Prefix=prefix)if "content" not in response:raise FileNotFoundError(f"Aucun modèle trouvé")latest = max(response["content"], key=lambda x: x["Last modified"])return latest["Key"]90 unmodified lines9192939495969790 unmodified linesdef latest_model(bucket:str, prefix: str):response = s3.list_objects_v2(Bucket=bucket, Prefix=prefix)if "content" not in response:raise FileNotFoundError(f"Aucun modèle trouvé dans s3://{bucket}/{prefix}")latest = max(response["content"], key=lambda x: x["Last modified"])return latest["Key"]
app.py+1-1