Spaces:
Running
Running
ChenyuRabbitLove
commited on
Commit
•
11254d8
1
Parent(s):
28bbca9
refactor: refactor folder structure
Browse files- .gitignore +162 -0
- app.py +83 -119
- bg_clear.png +0 -3
- css/style.css +70 -0
- achievement.html → htmls/achievement.html +0 -0
- gallery.html → htmls/gallery.html +0 -0
- progress_bar.html → htmls/progress_bar.html +0 -0
- stage_desc.html → htmls/stage_desc.html +0 -0
- medias/.DS_Store +0 -0
- avatar.png → medias/avatar.png +2 -2
- avatar2.png → medias/avatar2.png +2 -2
- badge.png → medias/badge.png +2 -2
- badge2.png → medias/badge2.png +2 -2
- badge3.png → medias/badge3.png +2 -2
- badge4.png → medias/badge4.png +2 -2
- medias/bg_clear.png +3 -0
- medias/partner1.png +3 -0
- partner2.png → medias/partner2.png +2 -2
- medias/partner3.png +3 -0
- medias/partner4.png +3 -0
- partner1.png +0 -3
- partner3.png +0 -3
- partner4.png +0 -3
- theme.py +3 -12
.gitignore
ADDED
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Byte-compiled / optimized / DLL files
|
2 |
+
__pycache__/
|
3 |
+
*.py[cod]
|
4 |
+
*$py.class
|
5 |
+
|
6 |
+
# C extensions
|
7 |
+
*.so
|
8 |
+
|
9 |
+
# Distribution / packaging
|
10 |
+
.Python
|
11 |
+
build/
|
12 |
+
develop-eggs/
|
13 |
+
dist/
|
14 |
+
downloads/
|
15 |
+
eggs/
|
16 |
+
.eggs/
|
17 |
+
lib/
|
18 |
+
lib64/
|
19 |
+
parts/
|
20 |
+
sdist/
|
21 |
+
var/
|
22 |
+
wheels/
|
23 |
+
share/python-wheels/
|
24 |
+
*.egg-info/
|
25 |
+
.installed.cfg
|
26 |
+
*.egg
|
27 |
+
MANIFEST
|
28 |
+
|
29 |
+
# PyInstaller
|
30 |
+
# Usually these files are written by a python script from a template
|
31 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
32 |
+
*.manifest
|
33 |
+
*.spec
|
34 |
+
|
35 |
+
# Installer logs
|
36 |
+
pip-log.txt
|
37 |
+
pip-delete-this-directory.txt
|
38 |
+
|
39 |
+
# Unit test / coverage reports
|
40 |
+
htmlcov/
|
41 |
+
.tox/
|
42 |
+
.nox/
|
43 |
+
.coverage
|
44 |
+
.coverage.*
|
45 |
+
.cache
|
46 |
+
nosetests.xml
|
47 |
+
coverage.xml
|
48 |
+
*.cover
|
49 |
+
*.py,cover
|
50 |
+
.hypothesis/
|
51 |
+
.pytest_cache/
|
52 |
+
cover/
|
53 |
+
|
54 |
+
# Translations
|
55 |
+
*.mo
|
56 |
+
*.pot
|
57 |
+
|
58 |
+
# Django stuff:
|
59 |
+
*.log
|
60 |
+
local_settings.py
|
61 |
+
db.sqlite3
|
62 |
+
db.sqlite3-journal
|
63 |
+
|
64 |
+
# Flask stuff:
|
65 |
+
instance/
|
66 |
+
.webassets-cache
|
67 |
+
|
68 |
+
# Scrapy stuff:
|
69 |
+
.scrapy
|
70 |
+
|
71 |
+
# Sphinx documentation
|
72 |
+
docs/_build/
|
73 |
+
|
74 |
+
# PyBuilder
|
75 |
+
.pybuilder/
|
76 |
+
target/
|
77 |
+
|
78 |
+
# Jupyter Notebook
|
79 |
+
.ipynb_checkpoints
|
80 |
+
|
81 |
+
# IPython
|
82 |
+
profile_default/
|
83 |
+
ipython_config.py
|
84 |
+
|
85 |
+
# pyenv
|
86 |
+
# For a library or package, you might want to ignore these files since the code is
|
87 |
+
# intended to run in multiple environments; otherwise, check them in:
|
88 |
+
# .python-version
|
89 |
+
|
90 |
+
# pipenv
|
91 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
92 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
93 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
94 |
+
# install all needed dependencies.
|
95 |
+
#Pipfile.lock
|
96 |
+
|
97 |
+
# poetry
|
98 |
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
99 |
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
100 |
+
# commonly ignored for libraries.
|
101 |
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
102 |
+
#poetry.lock
|
103 |
+
|
104 |
+
# pdm
|
105 |
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
106 |
+
#pdm.lock
|
107 |
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
108 |
+
# in version control.
|
109 |
+
# https://pdm.fming.dev/#use-with-ide
|
110 |
+
.pdm.toml
|
111 |
+
|
112 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
113 |
+
__pypackages__/
|
114 |
+
|
115 |
+
# Celery stuff
|
116 |
+
celerybeat-schedule
|
117 |
+
celerybeat.pid
|
118 |
+
|
119 |
+
# SageMath parsed files
|
120 |
+
*.sage.py
|
121 |
+
|
122 |
+
# Environments
|
123 |
+
.env
|
124 |
+
.venv
|
125 |
+
env/
|
126 |
+
venv/
|
127 |
+
ENV/
|
128 |
+
env.bak/
|
129 |
+
venv.bak/
|
130 |
+
|
131 |
+
# Spyder project settings
|
132 |
+
.spyderproject
|
133 |
+
.spyproject
|
134 |
+
|
135 |
+
# Rope project settings
|
136 |
+
.ropeproject
|
137 |
+
|
138 |
+
# mkdocs documentation
|
139 |
+
/site
|
140 |
+
|
141 |
+
# mypy
|
142 |
+
.mypy_cache/
|
143 |
+
.dmypy.json
|
144 |
+
dmypy.json
|
145 |
+
|
146 |
+
# Pyre type checker
|
147 |
+
.pyre/
|
148 |
+
|
149 |
+
# pytype static type analyzer
|
150 |
+
.pytype/
|
151 |
+
|
152 |
+
# Cython debug symbols
|
153 |
+
cython_debug/
|
154 |
+
|
155 |
+
# PyCharm
|
156 |
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
157 |
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
158 |
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
159 |
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
160 |
+
#.idea/
|
161 |
+
|
162 |
+
.DS_Store
|
app.py
CHANGED
@@ -1,131 +1,91 @@
|
|
1 |
-
import os
|
2 |
import json
|
3 |
|
4 |
import gradio as gr
|
5 |
-
import numpy as np
|
6 |
-
from google.oauth2.service_account import Credentials
|
7 |
-
from google.cloud import bigquery
|
8 |
|
9 |
from theme import Seafoam
|
10 |
|
11 |
seafoam = Seafoam()
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
creds = Credentials.from_service_account_info(
|
18 |
-
service_account_info_dict, scopes=SCOPES
|
19 |
-
)
|
20 |
-
client = bigquery.Client(credentials=creds, project=service_account_info_dict['project_id'])
|
21 |
-
|
22 |
-
with open('achievement.html', 'r', encoding='utf-8') as file:
|
23 |
-
html = file.read()
|
24 |
-
|
25 |
-
|
26 |
-
html = "<div style='max-width:100%; max-height:360px; overflow:auto'>" + html
|
27 |
-
|
28 |
-
css="""
|
29 |
-
|
30 |
-
#user_avatar {
|
31 |
-
background-color: transparent !important;
|
32 |
-
border-radius: 50% !important;
|
33 |
-
box-shadow: 0 10px 15px rgba(0,0,0,0.1);
|
34 |
-
border-color: #fff !important;
|
35 |
-
}
|
36 |
-
|
37 |
-
#user_avatar > div > img {
|
38 |
-
}
|
39 |
-
|
40 |
-
#user_avatar_description h1{
|
41 |
-
font-size: 2.5rem;
|
42 |
-
text-align: center;
|
43 |
-
}
|
44 |
-
|
45 |
-
#pet_avatar_description h1{
|
46 |
-
font-size: 2rem;
|
47 |
-
text-align: center;
|
48 |
-
}
|
49 |
-
|
50 |
-
#badge_avatar_description h1{
|
51 |
-
font-size: 2rem;
|
52 |
-
text-align: center;
|
53 |
-
}
|
54 |
-
|
55 |
-
#adventure_description h1{
|
56 |
-
font-size: 2rem;
|
57 |
-
text-align: center;
|
58 |
-
}
|
59 |
-
|
60 |
-
#achievement_log {
|
61 |
-
margin: 2.5rem auto 0 auto;
|
62 |
-
}
|
63 |
-
|
64 |
-
#pet_gallery .grid-wrap button {
|
65 |
-
margin: .5vh;
|
66 |
-
background: transparent !important;
|
67 |
-
border-color: transparent !important;
|
68 |
-
height: 150px !important;
|
69 |
-
width: 6vh !important;
|
70 |
-
border-radius: 20px;
|
71 |
-
box-shadow: 0 0 10px rgba(0,0,0,0.3);
|
72 |
-
}
|
73 |
-
|
74 |
-
#pet_gallery .grid-container {
|
75 |
-
grid-template-columns: repeat(30, minmax(6vh, 1fr));
|
76 |
-
}
|
77 |
-
|
78 |
-
#badge_gallery .grid-wrap button {
|
79 |
-
margin: .5vh;
|
80 |
-
height: 150px !important;
|
81 |
-
width: 10vh !important;
|
82 |
-
background: transparent !important;
|
83 |
-
border-color: transparent !important;
|
84 |
-
border-radius: 20px;
|
85 |
-
box-shadow: 0 0 10px rgba(0,0,0,0.3);
|
86 |
-
backdrop-filter: blur(10px);
|
87 |
-
}
|
88 |
-
|
89 |
-
::-webkit-scrollbar {
|
90 |
-
width: 5px;
|
91 |
-
height: 10px;
|
92 |
-
}
|
93 |
-
|
94 |
-
[data-testid="block-label"] {
|
95 |
-
opacity: 0;
|
96 |
-
}
|
97 |
-
|
98 |
-
[aria-label="Share"] {
|
99 |
-
opacity: 0;
|
100 |
-
}
|
101 |
-
"""
|
102 |
|
103 |
# start of gradio interface
|
104 |
with gr.Blocks(theme=seafoam, css=css) as demo:
|
105 |
-
|
106 |
with gr.Row():
|
107 |
-
with gr.Column(
|
108 |
-
|
109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
|
111 |
-
badge_gallery = gr.Gallery(['badge.png', 'badge2.png', 'badge3.png', 'badge4.png'] * 2, label="徽章", preview=False, elem_id='badge_gallery', columns=30, height=200)
|
112 |
-
badge_description = gr.Markdown('# 徽章', elem_id='badge_avatar_description')
|
113 |
with gr.Column(scale=1):
|
114 |
-
avatar = gr.Gallery(
|
115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
with gr.Column(scale=1):
|
117 |
-
description = gr.Markdown(
|
118 |
|
119 |
-
with open(
|
120 |
progress_bar_html = file.read()
|
121 |
-
progress_bar_html =
|
122 |
-
|
123 |
-
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
125 |
stage_desc_html = file.read()
|
126 |
-
stage_desc_html =
|
127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
with gr.Row():
|
|
|
|
|
|
|
129 |
f = gr.HTML(html, label="Achievement Log", elem_id="achievement_log")
|
130 |
|
131 |
with gr.Row():
|
@@ -133,27 +93,31 @@ with gr.Blocks(theme=seafoam, css=css) as demo:
|
|
133 |
o = gr.Textbox()
|
134 |
b = gr.Button(elem_id="test2")
|
135 |
df = gr.DataFrame()
|
136 |
-
|
137 |
def run_query(user_id):
|
138 |
QUERY = (
|
139 |
-
|
140 |
-
|
141 |
)
|
142 |
-
print(f
|
143 |
query_job = client.query(QUERY)
|
144 |
-
print(
|
145 |
query_result = query_job.result()
|
146 |
-
print(
|
147 |
df = query_result.to_dataframe()
|
148 |
-
print(
|
149 |
# Select a subset of columns
|
150 |
df = df[["created_at", "points", "user_role", "joined", "developer"]]
|
151 |
# Convert numeric columns to standard numpy types
|
152 |
-
print(
|
153 |
df = df.astype({"points": np.int64})
|
154 |
return df
|
155 |
-
|
156 |
-
b.click(
|
|
|
|
|
|
|
|
|
157 |
|
158 |
|
159 |
if __name__ == "__main__":
|
|
|
|
|
1 |
import json
|
2 |
|
3 |
import gradio as gr
|
|
|
|
|
|
|
4 |
|
5 |
from theme import Seafoam
|
6 |
|
7 |
seafoam = Seafoam()
|
8 |
|
9 |
+
# load css
|
10 |
+
with open("css/style.css", "r", encoding="utf-8") as file:
|
11 |
+
css = file.read()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
# start of gradio interface
|
14 |
with gr.Blocks(theme=seafoam, css=css) as demo:
|
|
|
15 |
with gr.Row():
|
16 |
+
with gr.Column(
|
17 |
+
scale=1,
|
18 |
+
):
|
19 |
+
pet_gallery = gr.Gallery(
|
20 |
+
[
|
21 |
+
"media/partner1.png",
|
22 |
+
"media/partner2.png",
|
23 |
+
"media/partner3.png",
|
24 |
+
"media/partner4.png",
|
25 |
+
]
|
26 |
+
* 2,
|
27 |
+
label="夥伴",
|
28 |
+
preview=False,
|
29 |
+
elem_id="pet_gallery",
|
30 |
+
columns=30,
|
31 |
+
height=200,
|
32 |
+
)
|
33 |
+
pet_description = gr.Markdown("# 夥伴", elem_id="pet_avatar_description")
|
34 |
+
|
35 |
+
badge_gallery = gr.Gallery(
|
36 |
+
[
|
37 |
+
"media/badge.png",
|
38 |
+
"media/badge2.png",
|
39 |
+
"media/badge3.png",
|
40 |
+
"media/badge4.png",
|
41 |
+
]
|
42 |
+
* 2,
|
43 |
+
show_share_button=True,
|
44 |
+
label="徽章",
|
45 |
+
preview=False,
|
46 |
+
elem_id="badge_gallery",
|
47 |
+
columns=30,
|
48 |
+
height=200,
|
49 |
+
)
|
50 |
+
badge_description = gr.Markdown("# 徽章", elem_id="badge_avatar_description")
|
51 |
|
|
|
|
|
52 |
with gr.Column(scale=1):
|
53 |
+
avatar = gr.Gallery(
|
54 |
+
["media/avatar.png", "media/avatar2.png"],
|
55 |
+
preview=True,
|
56 |
+
elem_id="user_avatar",
|
57 |
+
)
|
58 |
+
avatar_description = gr.Markdown(
|
59 |
+
"# 光束守護者", elem_id="user_avatar_description"
|
60 |
+
)
|
61 |
+
|
62 |
with gr.Column(scale=1):
|
63 |
+
description = gr.Markdown("# 冒險階段", elem_id="adventure_description")
|
64 |
|
65 |
+
with open("htmls/progress_bar.html", "r", encoding="utf-8") as file:
|
66 |
progress_bar_html = file.read()
|
67 |
+
progress_bar_html = (
|
68 |
+
"<div style='max-width:100%; max-height:360px; overflow:auto'>"
|
69 |
+
+ progress_bar_html
|
70 |
+
)
|
71 |
+
progress_bar = gr.HTML(
|
72 |
+
progress_bar_html,
|
73 |
+
)
|
74 |
+
|
75 |
+
with open("htmls/stage_desc.html", "r", encoding="utf-8") as file:
|
76 |
stage_desc_html = file.read()
|
77 |
+
stage_desc_html = (
|
78 |
+
"<div style='max-width:100%; max-height:360px; overflow:auto'>"
|
79 |
+
+ stage_desc_html
|
80 |
+
)
|
81 |
+
stage_desc = gr.HTML(
|
82 |
+
stage_desc_html,
|
83 |
+
)
|
84 |
+
|
85 |
with gr.Row():
|
86 |
+
with open("htmls/achievement.html", "r", encoding="utf-8") as file:
|
87 |
+
html = file.read()
|
88 |
+
html = "<div style='max-width:100%; max-height:360px; overflow:auto'>" + html
|
89 |
f = gr.HTML(html, label="Achievement Log", elem_id="achievement_log")
|
90 |
|
91 |
with gr.Row():
|
|
|
93 |
o = gr.Textbox()
|
94 |
b = gr.Button(elem_id="test2")
|
95 |
df = gr.DataFrame()
|
96 |
+
|
97 |
def run_query(user_id):
|
98 |
QUERY = (
|
99 |
+
"SELECT created_at, points, user_role, joined, developer FROM `datastore_backup.UserData`"
|
100 |
+
f"WHERE user_id = '{user_id}'"
|
101 |
)
|
102 |
+
print(f"Start query, user_id: {user_id}, {QUERY}")
|
103 |
query_job = client.query(QUERY)
|
104 |
+
print("Running query")
|
105 |
query_result = query_job.result()
|
106 |
+
print("Query complete")
|
107 |
df = query_result.to_dataframe()
|
108 |
+
print("Convert to dataframe")
|
109 |
# Select a subset of columns
|
110 |
df = df[["created_at", "points", "user_role", "joined", "developer"]]
|
111 |
# Convert numeric columns to standard numpy types
|
112 |
+
print("Convert to numpy")
|
113 |
df = df.astype({"points": np.int64})
|
114 |
return df
|
115 |
+
|
116 |
+
b.click(
|
117 |
+
run_query,
|
118 |
+
i,
|
119 |
+
df,
|
120 |
+
)
|
121 |
|
122 |
|
123 |
if __name__ == "__main__":
|
bg_clear.png
DELETED
Git LFS Details
|
css/style.css
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.gradio-container {background: url('file=media/bg_clear.png')}
|
2 |
+
|
3 |
+
#user_avatar {
|
4 |
+
background-color: transparent !important;
|
5 |
+
border-radius: 50% !important;
|
6 |
+
box-shadow: 0 10px 15px rgba(0,0,0,0.1);
|
7 |
+
border-color: #fff !important;
|
8 |
+
}
|
9 |
+
|
10 |
+
#user_avatar_description h1{
|
11 |
+
font-size: 2.5rem;
|
12 |
+
text-align: center;
|
13 |
+
}
|
14 |
+
|
15 |
+
#pet_avatar_description h1{
|
16 |
+
font-size: 2rem;
|
17 |
+
text-align: center;
|
18 |
+
}
|
19 |
+
|
20 |
+
#badge_avatar_description h1{
|
21 |
+
font-size: 2rem;
|
22 |
+
text-align: center;
|
23 |
+
}
|
24 |
+
|
25 |
+
#adventure_description h1{
|
26 |
+
font-size: 2rem;
|
27 |
+
text-align: center;
|
28 |
+
}
|
29 |
+
|
30 |
+
#achievement_log {
|
31 |
+
margin: 2.5rem auto 0 auto;
|
32 |
+
}
|
33 |
+
|
34 |
+
#pet_gallery .grid-wrap button {
|
35 |
+
margin: .5vh;
|
36 |
+
background: transparent !important;
|
37 |
+
border-color: transparent !important;
|
38 |
+
height: 150px !important;
|
39 |
+
width: 6vh !important;
|
40 |
+
border-radius: 20px;
|
41 |
+
box-shadow: 0 0 10px rgba(0,0,0,0.3);
|
42 |
+
}
|
43 |
+
|
44 |
+
#pet_gallery .grid-container {
|
45 |
+
grid-template-columns: repeat(30, minmax(6vh, 1fr));
|
46 |
+
}
|
47 |
+
|
48 |
+
#badge_gallery .grid-wrap button {
|
49 |
+
margin: .5vh;
|
50 |
+
height: 150px !important;
|
51 |
+
width: 10vh !important;
|
52 |
+
background: transparent !important;
|
53 |
+
border-color: transparent !important;
|
54 |
+
border-radius: 20px;
|
55 |
+
box-shadow: 0 0 10px rgba(0,0,0,0.3);
|
56 |
+
backdrop-filter: blur(10px);
|
57 |
+
}
|
58 |
+
|
59 |
+
::-webkit-scrollbar {
|
60 |
+
width: 5px;
|
61 |
+
height: 10px;
|
62 |
+
}
|
63 |
+
|
64 |
+
[data-testid="block-label"] {
|
65 |
+
opacity: 0;
|
66 |
+
}
|
67 |
+
|
68 |
+
[aria-label="Share"] {
|
69 |
+
opacity: 0;
|
70 |
+
}
|
achievement.html → htmls/achievement.html
RENAMED
File without changes
|
gallery.html → htmls/gallery.html
RENAMED
File without changes
|
progress_bar.html → htmls/progress_bar.html
RENAMED
File without changes
|
stage_desc.html → htmls/stage_desc.html
RENAMED
File without changes
|
medias/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
avatar.png → medias/avatar.png
RENAMED
File without changes
|
avatar2.png → medias/avatar2.png
RENAMED
File without changes
|
badge.png → medias/badge.png
RENAMED
File without changes
|
badge2.png → medias/badge2.png
RENAMED
File without changes
|
badge3.png → medias/badge3.png
RENAMED
File without changes
|
badge4.png → medias/badge4.png
RENAMED
File without changes
|
medias/bg_clear.png
ADDED
Git LFS Details
|
medias/partner1.png
ADDED
Git LFS Details
|
partner2.png → medias/partner2.png
RENAMED
File without changes
|
medias/partner3.png
ADDED
Git LFS Details
|
medias/partner4.png
ADDED
Git LFS Details
|
partner1.png
DELETED
Git LFS Details
|
partner3.png
DELETED
Git LFS Details
|
partner4.png
DELETED
Git LFS Details
|
theme.py
CHANGED
@@ -3,6 +3,7 @@ from typing import Union, Iterable
|
|
3 |
from gradio.themes.base import Base
|
4 |
from gradio.themes.utils import colors, fonts, sizes
|
5 |
|
|
|
6 |
class Seafoam(Base):
|
7 |
def __init__(
|
8 |
self,
|
@@ -25,9 +26,6 @@ class Seafoam(Base):
|
|
25 |
),
|
26 |
):
|
27 |
super().__init__(
|
28 |
-
#primary_hue=primary_hue,
|
29 |
-
#secondary_hue=secondary_hue,
|
30 |
-
#neutral_hue=neutral_hue,
|
31 |
spacing_size=spacing_size,
|
32 |
radius_size=radius_size,
|
33 |
text_size=text_size,
|
@@ -35,22 +33,15 @@ class Seafoam(Base):
|
|
35 |
font_mono=font_mono,
|
36 |
)
|
37 |
super().set(
|
38 |
-
body_background_fill="url('file=bg_clear.png') no-repeat center center / cover",
|
39 |
-
body_background_fill_dark="url('file=bg_clear.png') no-repeat center center / cover",
|
40 |
-
|
41 |
body_text_color_dark="#333",
|
42 |
background_fill_primary_dark="rgba(255, 255, 255, 1)",
|
43 |
background_fill_secondary_dark="rgba(255, 255, 255, 0)",
|
44 |
block_background_fill_dark="rgba(255, 255, 255, 0.1)",
|
45 |
block_border_color_dark="rgba(255, 255, 255, 0.1)",
|
46 |
-
border_color_primary_dark=
|
47 |
-
# button_primary_background_fill="linear-gradient(90deg, *primary_300, *secondary_400)",
|
48 |
-
# button_primary_background_fill_hover="linear-gradient(90deg, *primary_200, *secondary_300)",
|
49 |
-
# button_primary_text_color="white",
|
50 |
-
# button_primary_background_fill_dark="linear-gradient(90deg, *primary_600, *secondary_800)",
|
51 |
slider_color="*secondary_300",
|
52 |
slider_color_dark="*secondary_600",
|
53 |
block_title_text_weight="600",
|
54 |
block_border_width="3px",
|
55 |
block_shadow="*shadow_drop_lg",
|
56 |
-
)
|
|
|
3 |
from gradio.themes.base import Base
|
4 |
from gradio.themes.utils import colors, fonts, sizes
|
5 |
|
6 |
+
|
7 |
class Seafoam(Base):
|
8 |
def __init__(
|
9 |
self,
|
|
|
26 |
),
|
27 |
):
|
28 |
super().__init__(
|
|
|
|
|
|
|
29 |
spacing_size=spacing_size,
|
30 |
radius_size=radius_size,
|
31 |
text_size=text_size,
|
|
|
33 |
font_mono=font_mono,
|
34 |
)
|
35 |
super().set(
|
|
|
|
|
|
|
36 |
body_text_color_dark="#333",
|
37 |
background_fill_primary_dark="rgba(255, 255, 255, 1)",
|
38 |
background_fill_secondary_dark="rgba(255, 255, 255, 0)",
|
39 |
block_background_fill_dark="rgba(255, 255, 255, 0.1)",
|
40 |
block_border_color_dark="rgba(255, 255, 255, 0.1)",
|
41 |
+
border_color_primary_dark="trasparent",
|
|
|
|
|
|
|
|
|
42 |
slider_color="*secondary_300",
|
43 |
slider_color_dark="*secondary_600",
|
44 |
block_title_text_weight="600",
|
45 |
block_border_width="3px",
|
46 |
block_shadow="*shadow_drop_lg",
|
47 |
+
)
|