Spaces:
Running
Running
Refactor app.py and css_html_js.py to improve UI and functionality
Browse files- app.py +7 -1
- src/about.py +1 -1
app.py
CHANGED
@@ -148,7 +148,13 @@ def init_detailed_results():
|
|
148 |
""")
|
149 |
|
150 |
|
151 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
with demo:
|
153 |
gr.HTML(TITLE)
|
154 |
gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
|
|
|
148 |
""")
|
149 |
|
150 |
|
151 |
+
HEAD = "\n".join(
|
152 |
+
[
|
153 |
+
f'<link rel="stylesheet" href="{css}">' for css in CSS_EXTERNAL
|
154 |
+
]
|
155 |
+
)
|
156 |
+
|
157 |
+
demo = gr.Blocks(css=custom_css, head = HEAD)
|
158 |
with demo:
|
159 |
gr.HTML(TITLE)
|
160 |
gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
|
src/about.py
CHANGED
@@ -43,7 +43,7 @@ def get_link(item): #name, icon, url):
|
|
43 |
elif not icon or icon == "":
|
44 |
icon_tag = ""
|
45 |
else:
|
46 |
-
|
47 |
return f'{icon_tag} <a href="{url}" target="_blank">{name}</a>'
|
48 |
|
49 |
with open(os.path.join(os.path.dirname(__file__), "links.yaml"), "r", encoding="utf-8") as f:
|
|
|
43 |
elif not icon or icon == "":
|
44 |
icon_tag = ""
|
45 |
else:
|
46 |
+
icon_tag = icon
|
47 |
return f'{icon_tag} <a href="{url}" target="_blank">{name}</a>'
|
48 |
|
49 |
with open(os.path.join(os.path.dirname(__file__), "links.yaml"), "r", encoding="utf-8") as f:
|