lvwerra HF staff commited on
Commit
b0c1665
1 Parent(s): 7f1c847

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -3,16 +3,18 @@ import streamlit as st
3
 
4
 
5
  @st.cache()
6
- def load_all_repository_names():
7
- list_of_repo_names = ["test"]
8
- #list_of_repo_names = load_dataset("bigcode/the-stack-paths", split="train")["repository_name"]
9
- return list_of_repo_names
10
 
11
  st.title("Am I in The Stack?")
12
  st.markdown("This tool lets you check if a repository under a given username is part of [The Stack dataset](https://huggingface.co/datasets/bigcode/the-stack).")
13
- repo_names = load_all_repository_names()
14
- n_repos = len(repo_names)
15
 
16
  username = st.text_input("GitHub Username:")
17
 
18
- st.markdown("_Note_: this Space is currently under construction.")
 
 
 
 
 
3
 
4
 
5
  @st.cache()
6
+ def load_all_usernames():
7
+ list_of_usernames = load_dataset("bigcode/the-stack-usernames", split="train")["usernames"]
8
+ return set(list_of_repo_names)
 
9
 
10
  st.title("Am I in The Stack?")
11
  st.markdown("This tool lets you check if a repository under a given username is part of [The Stack dataset](https://huggingface.co/datasets/bigcode/the-stack).")
12
+ usernames = load_all_usernames()
 
13
 
14
  username = st.text_input("GitHub Username:")
15
 
16
+ if st.button("Check!"):
17
+ if username in usernames:
18
+ st.markdown("**Yes**, your data is in The Stack.")
19
+ else:
20
+ st.markdown("**No**, your data is not in The Stack.")