Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import streamlit as st
|
|
3 |
from huggingface_hub import hf_hub_download
|
4 |
import gzip
|
5 |
import json
|
|
|
6 |
|
7 |
|
8 |
@st.cache(allow_output_mutation=True)
|
@@ -21,9 +22,14 @@ st.markdown("As part of the BigCode project, we released and maintain [The Stack
|
|
21 |
|
22 |
st.markdown("This tool lets you check if a repository under a given username is part of The Stack dataset. Would you like to have your data removed from future versions of The Stack? You can opt-out following the instructions [here](https://www.bigcode-project.org/docs/about/the-stack/#how-can-i-request-that-my-data-be-removed-from-the-stack).")
|
23 |
|
|
|
|
|
24 |
usernames = load_all_usernames()
|
|
|
25 |
username = st.text_input("Your GitHub Username:")
|
26 |
|
|
|
|
|
27 |
if username or st.button("Check!"):
|
28 |
if username in usernames:
|
29 |
repos = usernames[username]
|
@@ -32,4 +38,7 @@ if username or st.button("Check!"):
|
|
32 |
for repo in repos:
|
33 |
st.markdown(f"`{repo['repository']}`")
|
34 |
else:
|
35 |
-
st.markdown("**No**, your code is not in The Stack.")
|
|
|
|
|
|
|
|
3 |
from huggingface_hub import hf_hub_download
|
4 |
import gzip
|
5 |
import json
|
6 |
+
import time
|
7 |
|
8 |
|
9 |
@st.cache(allow_output_mutation=True)
|
|
|
22 |
|
23 |
st.markdown("This tool lets you check if a repository under a given username is part of The Stack dataset. Would you like to have your data removed from future versions of The Stack? You can opt-out following the instructions [here](https://www.bigcode-project.org/docs/about/the-stack/#how-can-i-request-that-my-data-be-removed-from-the-stack).")
|
24 |
|
25 |
+
|
26 |
+
t_load = time.time()
|
27 |
usernames = load_all_usernames()
|
28 |
+
t_load = f"{time.time()-t_load:.2f}"
|
29 |
username = st.text_input("Your GitHub Username:")
|
30 |
|
31 |
+
t_display = time.time()
|
32 |
+
|
33 |
if username or st.button("Check!"):
|
34 |
if username in usernames:
|
35 |
repos = usernames[username]
|
|
|
38 |
for repo in repos:
|
39 |
st.markdown(f"`{repo['repository']}`")
|
40 |
else:
|
41 |
+
st.markdown("**No**, your code is not in The Stack.")
|
42 |
+
|
43 |
+
t_display = f"{time.time()-t_load:.2f}"
|
44 |
+
st.markdown(f"_load: {t_load}s, display: {t_display}_")
|