mirror of
https://github.com/GokuMohandas/Made-With-ML.git
synced 2026-03-11 00:05:12 -05:00
10 lines
274 B
Python
10 lines
274 B
Python
import ray
|
|
|
|
from madewithml import predict
|
|
|
|
|
|
def get_label(text, predictor):
|
|
sample_ds = ray.data.from_items([{"title": text, "description": "", "tag": "other"}])
|
|
results = predict.predict_proba(ds=sample_ds, predictor=predictor)
|
|
return results[0]["prediction"]
|