Abhishek Thakur
commited on
Commit
Β·
8b606ae
0
Parent(s):
first commit
Browse files- .gitignore +144 -0
- Overview.py +27 -0
- README.md +12 -0
- pages/1_π€_Dataset.py +17 -0
- pages/2_π_Leaderboard.py +29 -0
- pages/3_π₯_Submissions.py +22 -0
- requirements.txt +1 -0
- submit.py +0 -0
.gitignore
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Local stuff
|
2 |
+
.DS_Store
|
3 |
+
.vscode/
|
4 |
+
.vim/
|
5 |
+
|
6 |
+
# Byte-compiled / optimized / DLL files
|
7 |
+
__pycache__/
|
8 |
+
*.py[cod]
|
9 |
+
*$py.class
|
10 |
+
|
11 |
+
# C extensions
|
12 |
+
*.so
|
13 |
+
|
14 |
+
# Distribution / packaging
|
15 |
+
.Python
|
16 |
+
build/
|
17 |
+
develop-eggs/
|
18 |
+
dist/
|
19 |
+
downloads/
|
20 |
+
eggs/
|
21 |
+
.eggs/
|
22 |
+
lib/
|
23 |
+
lib64/
|
24 |
+
parts/
|
25 |
+
sdist/
|
26 |
+
var/
|
27 |
+
wheels/
|
28 |
+
pip-wheel-metadata/
|
29 |
+
share/python-wheels/
|
30 |
+
*.egg-info/
|
31 |
+
.installed.cfg
|
32 |
+
*.egg
|
33 |
+
MANIFEST
|
34 |
+
|
35 |
+
# PyInstaller
|
36 |
+
# Usually these files are written by a python script from a template
|
37 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
38 |
+
*.manifest
|
39 |
+
*.spec
|
40 |
+
|
41 |
+
# Installer logs
|
42 |
+
pip-log.txt
|
43 |
+
pip-delete-this-directory.txt
|
44 |
+
|
45 |
+
# Unit test / coverage reports
|
46 |
+
htmlcov/
|
47 |
+
.tox/
|
48 |
+
.nox/
|
49 |
+
.coverage
|
50 |
+
.coverage.*
|
51 |
+
.cache
|
52 |
+
nosetests.xml
|
53 |
+
coverage.xml
|
54 |
+
*.cover
|
55 |
+
*.py,cover
|
56 |
+
.hypothesis/
|
57 |
+
.pytest_cache/
|
58 |
+
|
59 |
+
# Translations
|
60 |
+
*.mo
|
61 |
+
*.pot
|
62 |
+
|
63 |
+
# Django stuff:
|
64 |
+
*.log
|
65 |
+
local_settings.py
|
66 |
+
db.sqlite3
|
67 |
+
db.sqlite3-journal
|
68 |
+
|
69 |
+
# Flask stuff:
|
70 |
+
instance/
|
71 |
+
.webassets-cache
|
72 |
+
|
73 |
+
# Scrapy stuff:
|
74 |
+
.scrapy
|
75 |
+
|
76 |
+
# Sphinx documentation
|
77 |
+
docs/_build/
|
78 |
+
|
79 |
+
# PyBuilder
|
80 |
+
target/
|
81 |
+
|
82 |
+
# Jupyter Notebook
|
83 |
+
.ipynb_checkpoints
|
84 |
+
|
85 |
+
# IPython
|
86 |
+
profile_default/
|
87 |
+
ipython_config.py
|
88 |
+
|
89 |
+
# pyenv
|
90 |
+
.python-version
|
91 |
+
|
92 |
+
# pipenv
|
93 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
94 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
95 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
96 |
+
# install all needed dependencies.
|
97 |
+
#Pipfile.lock
|
98 |
+
|
99 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
100 |
+
__pypackages__/
|
101 |
+
|
102 |
+
# Celery stuff
|
103 |
+
celerybeat-schedule
|
104 |
+
celerybeat.pid
|
105 |
+
|
106 |
+
# SageMath parsed files
|
107 |
+
*.sage.py
|
108 |
+
|
109 |
+
# Environments
|
110 |
+
*.env
|
111 |
+
.env
|
112 |
+
.venv
|
113 |
+
env/
|
114 |
+
venv/
|
115 |
+
ENV/
|
116 |
+
env.bak/
|
117 |
+
venv.bak/
|
118 |
+
|
119 |
+
# Spyder project settings
|
120 |
+
.spyderproject
|
121 |
+
.spyproject
|
122 |
+
|
123 |
+
# Rope project settings
|
124 |
+
.ropeproject
|
125 |
+
|
126 |
+
# mkdocs documentation
|
127 |
+
/site
|
128 |
+
|
129 |
+
# mypy
|
130 |
+
.mypy_cache/
|
131 |
+
.dmypy.json
|
132 |
+
dmypy.json
|
133 |
+
|
134 |
+
# Pyre type checker
|
135 |
+
.pyre/
|
136 |
+
|
137 |
+
# Terraform stuff
|
138 |
+
*.tfstate
|
139 |
+
*.tfstate.backup
|
140 |
+
.terraform**
|
141 |
+
**.tfvars
|
142 |
+
|
143 |
+
# Alembic / database artifcats
|
144 |
+
**.db
|
Overview.py
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
st.set_page_config(
|
4 |
+
page_title="Overview",
|
5 |
+
page_icon="π€",
|
6 |
+
)
|
7 |
+
|
8 |
+
st.write("# Welcome to Cats vs Dogs! π")
|
9 |
+
|
10 |
+
st.markdown(
|
11 |
+
"""
|
12 |
+
In this competition, you will be creating an image classifier that can distinguish between cats and dogs.
|
13 |
+
You can use any model you want, but we recommend using a pretrained model from the [π€ Hub](https://huggingface.co/models).
|
14 |
+
|
15 |
+
Rules:
|
16 |
+
- You can make upto 5 submissions per day.
|
17 |
+
- The test data has been divided into public and private splits.
|
18 |
+
- Your score on the public split will be shown on the leaderboard.
|
19 |
+
- Your final score will be based on your private split performance.
|
20 |
+
- The final rankings will be based on the private split performance.
|
21 |
+
- No cheating! You can only use the test data for inference. You cannot use it to train your model.
|
22 |
+
- No private sharing of code or data. You can discuss the competition on the forums, but please do not share any code or data.
|
23 |
+
- Have fun! π€
|
24 |
+
|
25 |
+
For detailed rules, please check the [rules page](https://huggingface.co/competitions/transformers-cats-vs-dogs).
|
26 |
+
"""
|
27 |
+
)
|
README.md
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: Cats Vs Dogs
|
3 |
+
emoji: π’
|
4 |
+
colorFrom: indigo
|
5 |
+
colorTo: gray
|
6 |
+
sdk: streamlit
|
7 |
+
sdk_version: 1.10.0
|
8 |
+
app_file: Overview.py
|
9 |
+
pinned: false
|
10 |
+
---
|
11 |
+
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
pages/1_π€_Dataset.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import time
|
3 |
+
import numpy as np
|
4 |
+
|
5 |
+
|
6 |
+
def app():
|
7 |
+
st.set_page_config(page_title="Dataset", page_icon="π")
|
8 |
+
|
9 |
+
st.markdown("# Dataset")
|
10 |
+
# st.sidebar.header("Dataset")
|
11 |
+
st.write(
|
12 |
+
"""The dataset used for this competition can be found here: https://huggingface.co/datasets/cats_vs_dogs"""
|
13 |
+
)
|
14 |
+
|
15 |
+
|
16 |
+
if __name__ == "__main__":
|
17 |
+
app()
|
pages/2_π_Leaderboard.py
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import pandas as pd
|
3 |
+
|
4 |
+
|
5 |
+
def fetch_leaderboard():
|
6 |
+
data_dict = {
|
7 |
+
"Team Name": ["Team 1", "Team 2", "Team 3", "Team 4", "Team 5"],
|
8 |
+
"Score": [0.9, 0.8, 0.7, 0.6, 0.5],
|
9 |
+
"Rank": [1, 2, 3, 4, 5],
|
10 |
+
"Submission Time": [
|
11 |
+
"2021-01-01 00:00:00",
|
12 |
+
"2021-01-01 00:00:00",
|
13 |
+
"2021-01-01 00:00:00",
|
14 |
+
"2021-01-01 00:00:00",
|
15 |
+
"2021-01-01 00:00:00",
|
16 |
+
],
|
17 |
+
}
|
18 |
+
return pd.DataFrame(data_dict)
|
19 |
+
|
20 |
+
|
21 |
+
def app():
|
22 |
+
st.set_page_config(page_title="Leaderboard", page_icon="π€")
|
23 |
+
st.markdown("## Leaderboard")
|
24 |
+
lb = fetch_leaderboard()
|
25 |
+
st.table(lb)
|
26 |
+
|
27 |
+
|
28 |
+
if __name__ == "__main__":
|
29 |
+
app()
|
pages/3_π₯_Submissions.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
|
4 |
+
SUBMISSION_TEXT = """You can make upto 5 submissions per day.
|
5 |
+
The test data has been divided into public and private splits.
|
6 |
+
Your score on the public split will be shown on the leaderboard.
|
7 |
+
Your final score will be based on your private split performance.
|
8 |
+
The final rankings will be based on the private split performance.
|
9 |
+
"""
|
10 |
+
|
11 |
+
|
12 |
+
def app():
|
13 |
+
st.set_page_config(page_title="Submissions", page_icon="π€")
|
14 |
+
st.write("## Submissions")
|
15 |
+
st.markdown(SUBMISSION_TEXT)
|
16 |
+
# add submissions history table
|
17 |
+
st.write("### Submissions History")
|
18 |
+
st.write("You have not made any submissions yet.")
|
19 |
+
|
20 |
+
|
21 |
+
if __name__ == "__main__":
|
22 |
+
app()
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
pandas==1.5.0
|
submit.py
ADDED
File without changes
|