Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,9 @@ def run_quality_check(dataset, column, n_samples):
|
|
49 |
data = pl.read_parquet(f"hf://datasets/{dataset}@~parquet/{config}/train/0000.parquet", columns=[column])
|
50 |
texts = data[column].to_list()
|
51 |
predictions = predict(texts[:n_samples])
|
52 |
-
|
|
|
|
|
53 |
|
54 |
|
55 |
with gr.Blocks() as demo:
|
|
|
49 |
data = pl.read_parquet(f"hf://datasets/{dataset}@~parquet/{config}/train/0000.parquet", columns=[column])
|
50 |
texts = data[column].to_list()
|
51 |
predictions = predict(texts[:n_samples])
|
52 |
+
counts = pd.DataFrame({"quality": predictions}).value_counts().to_frame()
|
53 |
+
counts.reset_index(inplace=True)
|
54 |
+
return counts
|
55 |
|
56 |
|
57 |
with gr.Blocks() as demo:
|