Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import json
|
|
7 |
|
8 |
@st.cache(allow_output_mutation=True)
|
9 |
def load_all_usernames():
|
10 |
-
filepath = hf_hub_download(repo_id="bigcode/the-stack-username-to-repo", filename="
|
11 |
|
12 |
with gzip.open(filepath, 'r') as f:
|
13 |
usernames = json.loads(f.read().decode('utf-8'))
|
@@ -29,7 +29,7 @@ if username or st.button("Check!"):
|
|
29 |
repos = usernames[username]
|
30 |
repo_word = "repository" if len(repos)==1 else "repositories"
|
31 |
st.markdown(f"**Yes**, there is code from **{len(repos)} {repo_word}** in The Stack:")
|
32 |
-
for
|
33 |
-
st.markdown(f"`{
|
34 |
else:
|
35 |
st.markdown("**No**, your code is not in The Stack.")
|
|
|
7 |
|
8 |
@st.cache(allow_output_mutation=True)
|
9 |
def load_all_usernames():
|
10 |
+
filepath = hf_hub_download(repo_id="bigcode/the-stack-username-to-repo", filename="username_to_repo_full.json.gz", repo_type="dataset")
|
11 |
|
12 |
with gzip.open(filepath, 'r') as f:
|
13 |
usernames = json.loads(f.read().decode('utf-8'))
|
|
|
29 |
repos = usernames[username]
|
30 |
repo_word = "repository" if len(repos)==1 else "repositories"
|
31 |
st.markdown(f"**Yes**, there is code from **{len(repos)} {repo_word}** in The Stack:")
|
32 |
+
for repo in repos:
|
33 |
+
st.markdown(f"`{repo['repository']}`")
|
34 |
else:
|
35 |
st.markdown("**No**, your code is not in The Stack.")
|