in-the-stack / app.py
anton-l's picture
anton-l HF Staff
Upload folder using huggingface_hub
b82744b verified
Raw
History Blame Contribute Delete
2.5 kB
import gradio as gr
text = """\
![](https://huggingface.co/spaces/lvwerra/in-the-stack-gr/resolve/main/banner.png)
**_The Stack is an open governance interface between the AI community and the open source community._**
# Am I in The Stack?
As part of the BigCode project, we released and maintain [The Stack V2](https://huggingface.co/datasets/bigcode/the-stack-v2), a 67 TB dataset of source code over 600 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.
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.
**Note:** The Stack v2.0 is built from public GitHub code provided by the [Software Heriage Archive](https://archive.softwareheritage.org/). It may include repositories that are no longer present on GitHub but were archived by Software Heritage. Before training the StarCoder 1 and 2 models an additional PII pipeline was run to remove names, emails, passwords and API keys from the code files. For more information see the [paper](https://arxiv.org/abs/2402.19173).
**Data source**:\
<img src="https://annex.softwareheritage.org/public/logo/software-heritage-logo-title.2048px.png" alt="Logo" style="height: 3em; vertical-align: middle;" />
"""
banner = """\
<div style="border: 2px solid #e91e8c; border-radius: 8px; padding: 16px 20px; background-color: #fdf0f7;">
<p style="margin: 0; font-size: 1.1em;">
<strong>The Stack v3 is now available and is a superset of v1 and v2.</strong><br>
To check if your repositories are included and to request an opt-out, please visit
<a href="https://huggingface.co/spaces/HuggingFaceCode/in-the-stack" target="_blank">
Am I in The Stack?</a>
</p>
</div>
"""
with gr.Blocks() as demo:
with gr.Row():
_, col, _ = gr.Column(scale=1), gr.Column(scale=6), gr.Column(scale=1)
with col:
gr.Markdown(text)
gr.HTML(banner)
demo.launch()