Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,6 +16,14 @@ import gradio as gr
|
|
| 16 |
from sklearn.preprocessing import LabelEncoder
|
| 17 |
from sklearn.impute import SimpleImputer
|
| 18 |
from sklearn.neighbors import NearestNeighbors
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
# Ensemble libs
|
| 21 |
import joblib
|
|
|
|
| 16 |
from sklearn.preprocessing import LabelEncoder
|
| 17 |
from sklearn.impute import SimpleImputer
|
| 18 |
from sklearn.neighbors import NearestNeighbors
|
| 19 |
+
# --- sklearn <-> wrappers compatibility shim ---
|
| 20 |
+
from sklearn.base import BaseEstimator
|
| 21 |
+
if not hasattr(BaseEstimator, "sklearn_tags"):
|
| 22 |
+
# scikit-learn < 1.6 only has get_tags(); provide sklearn_tags() alias
|
| 23 |
+
def _sklearn_tags(self):
|
| 24 |
+
# mimic 1.6 behavior by delegating to get_tags()
|
| 25 |
+
return self.get_tags()
|
| 26 |
+
BaseEstimator.sklearn_tags = _sklearn_tags
|
| 27 |
|
| 28 |
# Ensemble libs
|
| 29 |
import joblib
|