Spaces:
Runtime error
Runtime error
Banner.
Browse files- app.py +11 -15
- assets/banner.png +3 -0
- src/about.py +1 -6
app.py
CHANGED
|
@@ -17,7 +17,6 @@ from src.about import ( # β¬
οΈ split to insert the tabs right after the headi
|
|
| 17 |
CITATION_BUTTON_LABEL,
|
| 18 |
CITATION_BUTTON_TEXT,
|
| 19 |
EVALUATION_QUEUE_TEXT,
|
| 20 |
-
WHAT_IS_F1_HTML_BOTTOM_B,
|
| 21 |
WHAT_IS_F1_HTML_TOP,
|
| 22 |
)
|
| 23 |
from src.datamodel.data import F1Data
|
|
@@ -216,6 +215,17 @@ with blocks:
|
|
| 216 |
|
| 217 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
| 218 |
with gr.TabItem("What is FormulaOne", id=0, elem_id="what-is-tab"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 219 |
# Top content and categories table
|
| 220 |
gr.HTML(WHAT_IS_F1_HTML_TOP)
|
| 221 |
|
|
@@ -275,20 +285,6 @@ with blocks:
|
|
| 275 |
# Continue the text after the heading (before the first figure)
|
| 276 |
gr.HTML(WHAT_IS_F1_HTML_BOTTOM_A_AFTER_TABS)
|
| 277 |
|
| 278 |
-
# # Figure 1: bag_modifications.png (use gr.Image)
|
| 279 |
-
# gr.Image(
|
| 280 |
-
# "assets/bag_modifications.png",
|
| 281 |
-
# show_label=False,
|
| 282 |
-
# elem_classes=["f1-image"],
|
| 283 |
-
# show_share_button=False,
|
| 284 |
-
# show_download_button=False,
|
| 285 |
-
# show_fullscreen_button=False,
|
| 286 |
-
# width=550,
|
| 287 |
-
# )
|
| 288 |
-
# gr.HTML('<div class="f1-figcaption">An illustration of local modifications to bags.</div>')
|
| 289 |
-
#
|
| 290 |
-
# gr.HTML(WHAT_IS_F1_HTML_BOTTOM_B)
|
| 291 |
-
|
| 292 |
# Video (no autoplay/loop), smaller gap to caption via CSS
|
| 293 |
gr.Video(
|
| 294 |
"assets/DominatingSetAnimation.mp4",
|
|
|
|
| 17 |
CITATION_BUTTON_LABEL,
|
| 18 |
CITATION_BUTTON_TEXT,
|
| 19 |
EVALUATION_QUEUE_TEXT,
|
|
|
|
| 20 |
WHAT_IS_F1_HTML_TOP,
|
| 21 |
)
|
| 22 |
from src.datamodel.data import F1Data
|
|
|
|
| 215 |
|
| 216 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
| 217 |
with gr.TabItem("What is FormulaOne", id=0, elem_id="what-is-tab"):
|
| 218 |
+
|
| 219 |
+
gr.Image(
|
| 220 |
+
"assets/banner.png",
|
| 221 |
+
show_label=False,
|
| 222 |
+
elem_classes=["f1-image"],
|
| 223 |
+
show_share_button=False,
|
| 224 |
+
show_download_button=False,
|
| 225 |
+
show_fullscreen_button=False,
|
| 226 |
+
width=550,
|
| 227 |
+
)
|
| 228 |
+
|
| 229 |
# Top content and categories table
|
| 230 |
gr.HTML(WHAT_IS_F1_HTML_TOP)
|
| 231 |
|
|
|
|
| 285 |
# Continue the text after the heading (before the first figure)
|
| 286 |
gr.HTML(WHAT_IS_F1_HTML_BOTTOM_A_AFTER_TABS)
|
| 287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 288 |
# Video (no autoplay/loop), smaller gap to caption via CSS
|
| 289 |
gr.Video(
|
| 290 |
"assets/DominatingSetAnimation.mp4",
|
assets/banner.png
ADDED
|
Git LFS Details
|
src/about.py
CHANGED
|
@@ -63,12 +63,7 @@ WHAT_IS_F1_HTML_BOTTOM_A_AFTER_TABS = """
|
|
| 63 |
<blockquote class="my-6 f1-blockquote">
|
| 64 |
βFor every sufficiently tree-like graph, any problem definable in an expressive formal logic β Monadic Second-Order (MSO) logic β can be solved by a dynamic programming algorithm that operates in time linear in the order of the graph.β
|
| 65 |
</blockquote>
|
| 66 |
-
<p class="f1-p">The key is to use a structure known as a tree decomposition, which organises the graph
|
| 67 |
-
<!-- bag_modifications figure inserted via gr.Image in app.py -->
|
| 68 |
-
"""
|
| 69 |
-
|
| 70 |
-
# After the first figure, before the video
|
| 71 |
-
WHAT_IS_F1_HTML_BOTTOM_B = """
|
| 72 |
<p class="mb-4 f1-p">An algorithm can then traverse this tree of bags, solving the problem piece by piece using dynamic programming. This process involves designing a βstateβ that summarises all necessary information about the partial solution within a bag, and then defining how this state transforms as vertices are introduced, forgotten, or bags are merged.</p>
|
| 73 |
<!-- Video inserted via gr.Video in app.py -->
|
| 74 |
"""
|
|
|
|
| 63 |
<blockquote class="my-6 f1-blockquote">
|
| 64 |
βFor every sufficiently tree-like graph, any problem definable in an expressive formal logic β Monadic Second-Order (MSO) logic β can be solved by a dynamic programming algorithm that operates in time linear in the order of the graph.β
|
| 65 |
</blockquote>
|
| 66 |
+
<p class="f1-p">The key is to use a structure known as a tree decomposition, which organises the graph's vertices into a series of overlapping sets, or βbagsβ, that are themselves arranged in a tree.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
<p class="mb-4 f1-p">An algorithm can then traverse this tree of bags, solving the problem piece by piece using dynamic programming. This process involves designing a βstateβ that summarises all necessary information about the partial solution within a bag, and then defining how this state transforms as vertices are introduced, forgotten, or bags are merged.</p>
|
| 68 |
<!-- Video inserted via gr.Video in app.py -->
|
| 69 |
"""
|