Spaces:
Runtime error
Runtime error
File size: 395 Bytes
ef9a72e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from zeno import distill, metric, ZenoOptions
from pandas import DataFrame
@distill
def length(df: DataFrame, ops: ZenoOptions):
return df["prompt"].str.len()
@metric
def avg_image_nswf(df: DataFrame, ops: ZenoOptions):
return float(df["image_nsfw"].dropna().mean())
@metric
def avg_prompt_nsfw(df: DataFrame, ops: ZenoOptions):
return float(df["prompt_nsfw"].dropna().mean())
|