taishi-i commited on
Commit
7dcaa5c
1 Parent(s): 1d9ed01

update app.py

Browse files
app.py CHANGED
@@ -32,6 +32,7 @@ def convert_to_dataframe():
32
  "url",
33
  "stargazers_count",
34
  "downloads",
 
35
  "source",
36
  "score",
37
  "first_commit",
@@ -134,6 +135,26 @@ def main():
134
  index=0,
135
  )
136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  min_downloads = int(df["downloads"].min())
138
  max_downloads = int(df["downloads"].max())
139
 
@@ -219,7 +240,13 @@ def main():
219
  contained_project_name = df["project_name"].str.contains(
220
  query, case=False, na=False
221
  )
222
- df = df[contained_description | contained_project_name]
 
 
 
 
 
 
223
 
224
  if selected_languges:
225
  df = df[
@@ -235,6 +262,12 @@ def main():
235
  )
236
  ]
237
 
 
 
 
 
 
 
238
  if latest_repos_btn:
239
  df = df.sort_values(by="first_commit", ascending=False)
240
  df = df[:num_show_repos]
@@ -321,6 +354,20 @@ def main():
321
  )
322
  st.altair_chart(chart, use_container_width=True)
323
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
324
  with col2:
325
  if selected_source_type == "GitHub":
326
  vs_type = "stargazers_count"
 
32
  "url",
33
  "stargazers_count",
34
  "downloads",
35
+ "model_architectures",
36
  "source",
37
  "score",
38
  "first_commit",
 
135
  index=0,
136
  )
137
 
138
+ model_architectures = df["model_architectures"].tolist()
139
+ model_architectures_counts = Counter(model_architectures)
140
+ del model_architectures_counts[None]
141
+
142
+ model_architectures_counts = sorted(
143
+ model_architectures_counts.items(),
144
+ key=lambda x: x[1],
145
+ reverse=True,
146
+ )
147
+ model_architectures_list = [""] + [
148
+ model_and_count[0]
149
+ for model_and_count in model_architectures_counts
150
+ ]
151
+
152
+ selected_model_architecture = st.selectbox(
153
+ "Choose a model architecture",
154
+ model_architectures_list,
155
+ index=0,
156
+ )
157
+
158
  min_downloads = int(df["downloads"].min())
159
  max_downloads = int(df["downloads"].max())
160
 
 
240
  contained_project_name = df["project_name"].str.contains(
241
  query, case=False, na=False
242
  )
243
+ contained_model_arch = df["model_architectures"].str.contains(
244
+ query, case=False, na=False
245
+ )
246
+
247
+ df = df[
248
+ contained_description | contained_project_name | contained_model_arch
249
+ ]
250
 
251
  if selected_languges:
252
  df = df[
 
262
  )
263
  ]
264
 
265
+ if selected_model_architecture:
266
+ contained_model_arch = df["model_architectures"].str.contains(
267
+ selected_model_architecture, case=False, na=False
268
+ )
269
+ df = df[contained_model_arch]
270
+
271
  if latest_repos_btn:
272
  df = df.sort_values(by="first_commit", ascending=False)
273
  df = df[:num_show_repos]
 
354
  )
355
  st.altair_chart(chart, use_container_width=True)
356
 
357
+ model_architectures = df["model_architectures"].tolist()
358
+ model_architectures_counts = Counter(model_architectures)
359
+ del model_architectures_counts[None]
360
+ model_architectures_df = pd.DataFrame(
361
+ model_architectures_counts.items(),
362
+ columns=["Model_architectures", "Count"],
363
+ )
364
+ model_architectures_df = model_architectures_df.sort_values(
365
+ by="Count", ascending=False
366
+ )
367
+
368
+ st.markdown("### Model Architecture Table")
369
+ st.dataframe(model_architectures_df)
370
+
371
  with col2:
372
  if selected_source_type == "GitHub":
373
  vs_type = "stargazers_count"
awesome-japanese-nlp-resources-search.json CHANGED
The diff for this file is too large to render. See raw diff