davanstrien HF Staff commited on
Commit
d12dd0d
·
1 Parent(s): 82f6211

filter gradio repos

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -87,6 +87,11 @@ def get_top_k_notebooks_by_repo_type(type: str = "space", k: int = 50):
87
  return df.filter(pl.col("repo_type") == type).head(k).to_pandas()
88
 
89
 
 
 
 
 
 
90
  def update_stats():
91
  df = pl.LazyFrame(yield_notebooks_counts(exclude_users="gradio"))
92
 
@@ -155,6 +160,6 @@ with gr.Blocks() as demo:
155
  # repo_type.update(get_top_k_notebooks_by_repo_type, [repo_type, k],[df])
156
  gr.Markdown("## Notebooks on the Hub raw data")
157
  gr.DataFrame(pandas_df)
158
-
159
 
160
  demo.launch(debug=True)
 
87
  return df.filter(pl.col("repo_type") == type).head(k).to_pandas()
88
 
89
 
90
+ def raw_current_notebook_dataframe():
91
+ df = pl.DataFrame(yield_notebooks_counts(exclude_users="gradio"))
92
+ return df.to_pandas()
93
+
94
+
95
  def update_stats():
96
  df = pl.LazyFrame(yield_notebooks_counts(exclude_users="gradio"))
97
 
 
160
  # repo_type.update(get_top_k_notebooks_by_repo_type, [repo_type, k],[df])
161
  gr.Markdown("## Notebooks on the Hub raw data")
162
  gr.DataFrame(pandas_df)
163
+ # gr.DataFrame(raw_current_notebook_dataframe())
164
 
165
  demo.launch(debug=True)