nouamanetazi HF staff commited on
Commit
0d1f340
1 Parent(s): 48bcb8a

update top_k to 200

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. st_utils.py +1 -1
app.py CHANGED
@@ -80,8 +80,8 @@ if search_query != "":
80
  ):
81
  col1, col2, col3 = st.columns([5, 1, 1])
82
  col1.metric("Model", hit["modelId"])
83
- col2.metric("N° downloads", numerize(hit["downloads"]) if not math.isnan(hit["downloads"]) else "N/A")
84
- col3.metric("N° likes", numerize(hit["likes"]) if not math.isnan(hit["likes"]) else "N/A")
85
  st.button(
86
  f"View model on 🤗",
87
  on_click=lambda hit=hit: webbrowser.open(f"https://huggingface.co/{hit['modelId']}", new=2),
 
80
  ):
81
  col1, col2, col3 = st.columns([5, 1, 1])
82
  col1.metric("Model", hit["modelId"])
83
+ col2.metric("N° downloads", numerize(hit["downloads"]) if hit["downloads"] and not math.isnan(hit["downloads"]) else "N/A")
84
+ col3.metric("N° likes", numerize(hit["likes"]) if hit["likes"] and not math.isnan(hit["likes"]) else "N/A")
85
  st.button(
86
  f"View model on 🤗",
87
  on_click=lambda hit=hit: webbrowser.open(f"https://huggingface.co/{hit['modelId']}", new=2),
st_utils.py CHANGED
@@ -8,7 +8,7 @@ import itertools
8
  from pbr.version import VersionInfo
9
  print("hf_search version:", VersionInfo('hf_search').version_string())
10
 
11
- hf_search = HFSearch(top_k=1000)
12
 
13
  @st.cache
14
  def hf_api(query, limit=5, sort=None, filters={}):
 
8
  from pbr.version import VersionInfo
9
  print("hf_search version:", VersionInfo('hf_search').version_string())
10
 
11
+ hf_search = HFSearch(top_k=200)
12
 
13
  @st.cache
14
  def hf_api(query, limit=5, sort=None, filters={}):