Spaces:
Running
Running
Refactor about.py to center align GitHub, HuggingFace Dataset, and LeaderBoard links
Browse files- app.py +8 -10
- src/about.py +4 -4
- src/display/css_html_js.py +2 -5
app.py
CHANGED
@@ -138,29 +138,27 @@ def init_leaderboard(dataframes):
|
|
138 |
research_textbox.submit(update_data, inputs=[selected_subset, research_textbox, selected_columns], outputs=df)
|
139 |
selected_columns.change(update_data, inputs=[selected_subset, research_textbox, selected_columns], outputs=df)
|
140 |
|
|
|
141 |
def init_detailed_results():
|
142 |
with gr.Row():
|
143 |
-
gr.HTML(
|
|
|
144 |
<iframe
|
145 |
src="https://huggingface.co/datasets/lmms-lab/LiveBenchDetailedResults/embed/viewer/"
|
146 |
frameborder="0"
|
147 |
width="100%"
|
148 |
height="800px"
|
149 |
></iframe>
|
150 |
-
"""
|
|
|
151 |
|
152 |
|
153 |
HEAD = "".join(
|
154 |
-
[
|
155 |
-
|
156 |
-
]
|
157 |
-
+
|
158 |
-
[
|
159 |
-
f'<script src="{js}" crossorigin="anonymous"></script>' for js in JS_EXTERNAL
|
160 |
-
]
|
161 |
)
|
162 |
|
163 |
-
demo = gr.Blocks(css=custom_css, head
|
164 |
with demo:
|
165 |
gr.HTML(TITLE)
|
166 |
gr.HTML(LINKS)
|
|
|
138 |
research_textbox.submit(update_data, inputs=[selected_subset, research_textbox, selected_columns], outputs=df)
|
139 |
selected_columns.change(update_data, inputs=[selected_subset, research_textbox, selected_columns], outputs=df)
|
140 |
|
141 |
+
|
142 |
def init_detailed_results():
|
143 |
with gr.Row():
|
144 |
+
gr.HTML(
|
145 |
+
"""\
|
146 |
<iframe
|
147 |
src="https://huggingface.co/datasets/lmms-lab/LiveBenchDetailedResults/embed/viewer/"
|
148 |
frameborder="0"
|
149 |
width="100%"
|
150 |
height="800px"
|
151 |
></iframe>
|
152 |
+
"""
|
153 |
+
)
|
154 |
|
155 |
|
156 |
HEAD = "".join(
|
157 |
+
[f'<link rel="stylesheet" href="{css}">' for css in CSS_EXTERNAL]
|
158 |
+
+ [f'<script src="{js}" crossorigin="anonymous"></script>' for js in JS_EXTERNAL]
|
|
|
|
|
|
|
|
|
|
|
159 |
)
|
160 |
|
161 |
+
demo = gr.Blocks(css=custom_css, head=HEAD)
|
162 |
with demo:
|
163 |
gr.HTML(TITLE)
|
164 |
gr.HTML(LINKS)
|
src/about.py
CHANGED
@@ -32,7 +32,8 @@ TITLE = """<h1 align="center" id="space-title">Multimodal LiveBench: From Static
|
|
32 |
with open(os.path.join(os.path.dirname(__file__), "about.md"), "r") as f:
|
33 |
INTRODUCTION_TEXT = f.read()
|
34 |
|
35 |
-
|
|
|
36 |
name = item["name"]
|
37 |
icon = item.get("icon", None)
|
38 |
url = item.get("url", "#")
|
@@ -46,11 +47,10 @@ def get_link(item): #name, icon, url):
|
|
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:
|
50 |
links = yaml.safe_load(f)
|
51 |
-
LINKS = " | ".join([
|
52 |
-
get_link(item) for item in links
|
53 |
-
])
|
54 |
|
55 |
# Which evaluations are you running? how can people reproduce what you have?
|
56 |
LLM_BENCHMARKS_TEXT = f"""
|
|
|
32 |
with open(os.path.join(os.path.dirname(__file__), "about.md"), "r") as f:
|
33 |
INTRODUCTION_TEXT = f.read()
|
34 |
|
35 |
+
|
36 |
+
def get_link(item): # name, icon, url):
|
37 |
name = item["name"]
|
38 |
icon = item.get("icon", None)
|
39 |
url = item.get("url", "#")
|
|
|
47 |
icon_tag = icon
|
48 |
return f'{icon_tag} <a href="{url}" target="_blank">{name}</a>'
|
49 |
|
50 |
+
|
51 |
with open(os.path.join(os.path.dirname(__file__), "links.yaml"), "r", encoding="utf-8") as f:
|
52 |
links = yaml.safe_load(f)
|
53 |
+
LINKS = "<center>" + " | ".join([get_link(item) for item in links]) + "</center>"
|
|
|
|
|
54 |
|
55 |
# Which evaluations are you running? how can people reproduce what you have?
|
56 |
LLM_BENCHMARKS_TEXT = f"""
|
src/display/css_html_js.py
CHANGED
@@ -110,9 +110,6 @@ get_window_url_params = """
|
|
110 |
}
|
111 |
"""
|
112 |
|
113 |
-
CSS_EXTERNAL = [
|
114 |
-
]
|
115 |
|
116 |
-
JS_EXTERNAL = [
|
117 |
-
f"https://kit.fontawesome.com/{FONTAWESOME_KIT}.js"
|
118 |
-
]
|
|
|
110 |
}
|
111 |
"""
|
112 |
|
113 |
+
CSS_EXTERNAL = []
|
|
|
114 |
|
115 |
+
JS_EXTERNAL = [f"https://kit.fontawesome.com/{FONTAWESOME_KIT}.js"]
|
|
|
|