import uuid
import json


def parse_prediction_results(jsonl):
    """Parses JSONL prediction results to a dictionary."""

    prediction_results = json.loads(jsonl)["prediction"]
    prediction_id = str(uuid.uuid4())
    scores = prediction_results["scores"]
    classes = prediction_results["classes"]

    return {"prediction_id": prediction_id, "scores": scores, "classes": classes}