lambdaofgod commited on
Commit
40c2a2b
1 Parent(s): 6dfa0ea
Files changed (2) hide show
  1. .gitattributes +1 -0
  2. app.py +26 -0
.gitattributes CHANGED
@@ -25,3 +25,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
25
  *.zip filter=lfs diff=lfs merge=lfs -text
26
  *.zstandard filter=lfs diff=lfs merge=lfs -text
27
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
25
  *.zip filter=lfs diff=lfs merge=lfs -text
26
  *.zstandard filter=lfs diff=lfs merge=lfs -text
27
  *tfevents* filter=lfs diff=lfs merge=lfs -text
28
+ models_with_readmes.csv filter=lfs diff=lfs merge=lfs -text
app.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import streamlit as st
3
+ import math
4
+
5
+ models_df = pd.read_csv("models_with_readmes.csv").dropna(subset=["readme"])
6
+
7
+ st.title("Huggingface model explorer")
8
+ st.text(f"search {len(models_df)} models by name or readme")
9
+ st.text("note that there are many more models but here we only show those with readme")
10
+
11
+ query = st.text_input("model name query", value="")
12
+ readme_query = st.text_input("readme query", value="")
13
+
14
+ selected_models_df = models_df[
15
+ models_df["readme"].str.contains(readme_query)
16
+ & models_df["modelId"].str.contains(query)
17
+ ]
18
+
19
+ n_per_page = 10
20
+ slider = st.number_input("page", 0, math.ceil(len(selected_models_df) / 10))
21
+ selected_models_df_subset = selected_models_df.iloc[
22
+ slider * n_per_page : (slider + 1) * n_per_page
23
+ ]
24
+ st.write(f"matched {len(selected_models_df)} models")
25
+ for i, (model_name, readme) in enumerate(selected_models_df_subset[["modelId", "readme"]].itertuples(index=False)):
26
+ st.write(readme)