lvwerra HF staff commited on
Commit
5518841
1 Parent(s): 6127ee8

Update app.py (#12)

Browse files

- Update app.py (298f42e6ebbea1c0cec871e41aade78c129633fd)

Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -6,6 +6,11 @@ import urllib
6
 
7
  usernames = {}
8
 
 
 
 
 
 
9
  filepath = hf_hub_download(repo_id="bigcode/the-stack-username-to-repo", filename="username_to_repo.json.gz", repo_type="dataset", revision="v1.2")
10
  with gzip.open(filepath, 'r') as f:
11
  usernames["v1.2"] = json.loads(f.read().decode('utf-8'))
@@ -27,7 +32,7 @@ text = """\
27
  As part of the BigCode project, we released and maintain [The Stack](https://huggingface.co/datasets/bigcode/the-stack), a 6 TB dataset of permissively licensed source code over 300 programming languages. One of our goals in this project is to give people agency over their source code by letting them decide whether or not it should be used to develop and evaluate machine learning models, as we acknowledge that not all developers may wish to have their data used for that purpose.
28
  """ + """\
29
 
30
- 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).
31
  """
32
 
33
  opt_out_text_template = """\
@@ -76,7 +81,7 @@ with gr.Blocks() as demo:
76
  _, colum_2, _ = gr.Column(scale=1), gr.Column(scale=6), gr.Column(scale=1)
77
  with colum_2:
78
  gr.Markdown(text)
79
- version = gr.Dropdown(["v1.2", "v1.1", "v1.0"], label="The Stack version:", value="v1.2")
80
  username = gr.Text("", label="Your GitHub username:")
81
  check_button = gr.Button("Check!")
82
 
 
6
 
7
  usernames = {}
8
 
9
+
10
+ filepath = hf_hub_download(repo_id="bigcode/the-stack-username-to-repo", filename="username_to_repo.json.gz", repo_type="dataset", revision="v2.0")
11
+ with gzip.open(filepath, 'r') as f:
12
+ usernames["v2.0-rc"] = json.loads(f.read().decode('utf-8'))
13
+
14
  filepath = hf_hub_download(repo_id="bigcode/the-stack-username-to-repo", filename="username_to_repo.json.gz", repo_type="dataset", revision="v1.2")
15
  with gzip.open(filepath, 'r') as f:
16
  usernames["v1.2"] = json.loads(f.read().decode('utf-8'))
 
32
  As part of the BigCode project, we released and maintain [The Stack](https://huggingface.co/datasets/bigcode/the-stack), a 6 TB dataset of permissively licensed source code over 300 programming languages. One of our goals in this project is to give people agency over their source code by letting them decide whether or not it should be used to develop and evaluate machine learning models, as we acknowledge that not all developers may wish to have their data used for that purpose.
33
  """ + """\
34
 
35
+ 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). Note that previous opt-outs might still be displayed in the release candidate (denoted with "-rc"), which will be removed for the release.
36
  """
37
 
38
  opt_out_text_template = """\
 
81
  _, colum_2, _ = gr.Column(scale=1), gr.Column(scale=6), gr.Column(scale=1)
82
  with colum_2:
83
  gr.Markdown(text)
84
+ version = gr.Dropdown(["v2.0-rc", "v1.2", "v1.1", "v1.0"], label="The Stack version:", value="v2.0")
85
  username = gr.Text("", label="Your GitHub username:")
86
  check_button = gr.Button("Check!")
87