Spaces:
Runtime error
Runtime error
File size: 302 Bytes
3d6943b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import mlflow
import mlflow.sklearn
def load_model_from_run(run_id: str):
mlflow.set_tracking_uri("file:./mlruns") # FIXED
model_uri = f"runs:/{run_id}/model"
model = mlflow.sklearn.load_model(model_uri)
return model
def predict(model, X):
return model.predict(X) |