lvwerra HF staff commited on
Commit
e3197a5
1 Parent(s): 11a71fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -31,7 +31,7 @@ usernames = load_all_usernames(filename)
31
  print("Time load", time.time()-t_start)
32
 
33
  username = st.text_input("Your GitHub Username:")
34
-
35
  if st.button("Check!"):# or username:
36
  t_start = time.time()
37
  if username in usernames:
@@ -45,16 +45,19 @@ if st.button("Check!"):# or username:
45
  st.text("**No**, your code is not in The Stack.")
46
  print("Time to check", time.time()-t_start)
47
 
48
- #if st.button("I want to remove my data!"):
49
- with st.expander("I want to opt-out"):
 
 
50
  exclude_repo = []
51
  for repo in repos:
52
  exclude_repo.append(st.checkbox(repo, value=True))
53
-
 
 
54
  issue_text = "I want to remove the following repositories.\n\n"
55
- issue_text += "- "+ "\n - ".join([repo for (repo, exclude) in zip(repos, exclude_repo) if exclude])
56
  st.code(issue_text)
57
 
58
- st.markdown("Open an issue with the above text in the opt-out repo [here](https://github.com/bigcode-project/opt-out/issues/new)")
59
 
60
  print("Full time", time.time()-t_0)
31
  print("Time load", time.time()-t_start)
32
 
33
  username = st.text_input("Your GitHub Username:")
34
+ repos = []
35
  if st.button("Check!"):# or username:
36
  t_start = time.time()
37
  if username in usernames:
45
  st.text("**No**, your code is not in The Stack.")
46
  print("Time to check", time.time()-t_start)
47
 
48
+ #if st.button(""):
49
+ if len(repos)>0:
50
+ with st.expander("I want to remove my data from the Stack!"):
51
+ st.markdown("Select which repositories you would like to have removed:")
52
  exclude_repo = []
53
  for repo in repos:
54
  exclude_repo.append(st.checkbox(repo, value=True))
55
+
56
+
57
+ st.markdown("Open an issue with the below text in the opt-out repo [here](https://github.com/bigcode-project/opt-out/issues/new):")
58
  issue_text = "I want to remove the following repositories.\n\n"
59
+ issue_text += " - "+ "\n - ".join([repo for (repo, exclude) in zip(repos, exclude_repo) if exclude])
60
  st.code(issue_text)
61
 
 
62
 
63
  print("Full time", time.time()-t_0)