Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,16 +3,18 @@ import streamlit as st
|
|
3 |
|
4 |
|
5 |
@st.cache()
|
6 |
-
def
|
7 |
-
|
8 |
-
|
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 |
-
|
14 |
-
n_repos = len(repo_names)
|
15 |
|
16 |
username = st.text_input("GitHub Username:")
|
17 |
|
18 |
-
st.
|
|
|
|
|
|
|
|
|
|
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.")
|