File size: 545 Bytes
7ea2602
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
01896b4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from huggingface_hub import hf_hub_url, cached_download
import joblib
import pandas as pd

REPO_ID = "julien-c/wine-quality"
FILENAME = "sklearn_model.joblib"


model = joblib.load(cached_download(
    hf_hub_url(REPO_ID, FILENAME)
))

# model is a `sklearn.pipeline.Pipeline`
#GET SAMPLE DATA
data_file = cached_download(
    hf_hub_url(REPO_ID, "winequality-red.csv")
)
df = pd.read_csv(dataset)


X = df.drop(["Target"], axis=1)
Y = df["Target"]

print(X[:3])

#GET PREDICTIONS
labels = model.predict(X[:3])


#EVALUATE
model.score(X, Y)