polinaeterna commited on
Commit
317865f
·
verified ·
1 Parent(s): 2ad6313

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,14 +1,14 @@
1
- import gradio as gd
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["max"].max()
8
 
9
 
10
  def filter(min_value: min_min, max_value: min_max):
11
- df = data.select((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
 
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