Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
import gradio as
|
2 |
import polars as pl
|
3 |
|
4 |
|
5 |
data = pl.read_parquet("hf://datasets/polinaeterna/text_unnested/data/*.parquet")
|
6 |
min_min = data["min"].min()
|
7 |
-
min_max = data["
|
8 |
|
9 |
|
10 |
def filter(min_value: min_min, max_value: min_max):
|
11 |
-
df = data.
|
12 |
if df.shape[0] > 100:
|
13 |
return df.head(100)
|
14 |
return df
|
|
|
1 |
+
import gradio as gr
|
2 |
import polars as pl
|
3 |
|
4 |
|
5 |
data = pl.read_parquet("hf://datasets/polinaeterna/text_unnested/data/*.parquet")
|
6 |
min_min = data["min"].min()
|
7 |
+
min_max = data["min"].max()
|
8 |
|
9 |
|
10 |
def filter(min_value: min_min, max_value: min_max):
|
11 |
+
df = data.filter((pl.col("min") >= min_value) & (pl.col("min") <= max_value)).to_pandas()
|
12 |
if df.shape[0] > 100:
|
13 |
return df.head(100)
|
14 |
return df
|