Spaces:
Sleeping
Sleeping
github-actions[bot] commited on
Commit ·
e0397b9
1
Parent(s): 604836d
deploy: backend bundle from 912783f01b37d6cfb047b043ae626d46de109dbc
Browse files- Code/Backend/api_server.py +12 -3
Code/Backend/api_server.py
CHANGED
|
@@ -609,7 +609,10 @@ async def health_check():
|
|
| 609 |
"models_dir_exists": MODELS_DIR.exists(),
|
| 610 |
}
|
| 611 |
if model_version_info:
|
| 612 |
-
|
|
|
|
|
|
|
|
|
|
| 613 |
return response
|
| 614 |
|
| 615 |
response = {
|
|
@@ -623,7 +626,10 @@ async def health_check():
|
|
| 623 |
|
| 624 |
# Add version info if available
|
| 625 |
if model_version_info:
|
| 626 |
-
|
|
|
|
|
|
|
|
|
|
| 627 |
|
| 628 |
return response
|
| 629 |
|
|
@@ -969,7 +975,10 @@ async def authenticate_card(request: AuthenticateRequest):
|
|
| 969 |
|
| 970 |
# Add model version info if available
|
| 971 |
if model_version_info:
|
| 972 |
-
|
|
|
|
|
|
|
|
|
|
| 973 |
|
| 974 |
return AuthenticateResponse(**response_data)
|
| 975 |
|
|
|
|
| 609 |
"models_dir_exists": MODELS_DIR.exists(),
|
| 610 |
}
|
| 611 |
if model_version_info:
|
| 612 |
+
info = dict(model_version_info)
|
| 613 |
+
if 'trained_at' in info and not info.get('training_date'):
|
| 614 |
+
info['training_date'] = info['trained_at']
|
| 615 |
+
response["model_version"] = ModelVersionInfo(**info).model_dump()
|
| 616 |
return response
|
| 617 |
|
| 618 |
response = {
|
|
|
|
| 626 |
|
| 627 |
# Add version info if available
|
| 628 |
if model_version_info:
|
| 629 |
+
info = dict(model_version_info)
|
| 630 |
+
if 'trained_at' in info and not info.get('training_date'):
|
| 631 |
+
info['training_date'] = info['trained_at']
|
| 632 |
+
response["model_version"] = ModelVersionInfo(**info).model_dump()
|
| 633 |
|
| 634 |
return response
|
| 635 |
|
|
|
|
| 975 |
|
| 976 |
# Add model version info if available
|
| 977 |
if model_version_info:
|
| 978 |
+
info = dict(model_version_info)
|
| 979 |
+
if 'trained_at' in info and not info.get('training_date'):
|
| 980 |
+
info['training_date'] = info['trained_at']
|
| 981 |
+
response_data['model_version'] = ModelVersionInfo(**info)
|
| 982 |
|
| 983 |
return AuthenticateResponse(**response_data)
|
| 984 |
|