Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -4,7 +4,7 @@ from fastapi.middleware.cors import CORSMiddleware
|
|
4 |
import requests
|
5 |
import pandas as pd
|
6 |
import json
|
7 |
-
import httpx,os
|
8 |
import pandas as pd
|
9 |
from sklearn.model_selection import train_test_split, GridSearchCV
|
10 |
from sklearn.preprocessing import LabelEncoder
|
@@ -172,4 +172,5 @@ async def your_continuous_function(page: int,paginate: int,Tenant: str):
|
|
172 |
async def model_updated_time():
|
173 |
m_time_encoder = os.path.getmtime('encoders.joblib')
|
174 |
m_time_model = os.path.getmtime('xgb_model.joblib')
|
175 |
-
return {"base model created time ":m_time_encoder,
|
|
|
|
4 |
import requests
|
5 |
import pandas as pd
|
6 |
import json
|
7 |
+
import httpx,os,datetime
|
8 |
import pandas as pd
|
9 |
from sklearn.model_selection import train_test_split, GridSearchCV
|
10 |
from sklearn.preprocessing import LabelEncoder
|
|
|
172 |
async def model_updated_time():
|
173 |
m_time_encoder = os.path.getmtime('encoders.joblib')
|
174 |
m_time_model = os.path.getmtime('xgb_model.joblib')
|
175 |
+
return {"base model created time ":datetime.datetime.fromtimestamp(m_time_encoder),
|
176 |
+
"last model updated time":datetime.datetime.fromtimestamp(m_time_model)}
|