Spaces:
Runtime error
Runtime error
Add back buttons
Browse files
app.py
CHANGED
@@ -9,13 +9,12 @@ from transformers import CLIPModel, CLIPProcessor
|
|
9 |
|
10 |
pn.extension(design="bootstrap", sizing_mode="stretch_width")
|
11 |
|
12 |
-
|
13 |
-
"
|
14 |
-
"
|
15 |
-
"
|
16 |
-
"
|
17 |
-
"
|
18 |
-
"Discord": "https://discord.gg/AXRHnJU6sP",
|
19 |
}
|
20 |
|
21 |
|
@@ -119,16 +118,18 @@ interactive_result = pn.panel(
|
|
119 |
)
|
120 |
|
121 |
# add footer
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
)
|
|
|
|
|
126 |
|
127 |
# create dashboard
|
128 |
main = pn.WidgetBox(
|
129 |
input_widgets,
|
130 |
interactive_result,
|
131 |
-
|
132 |
)
|
133 |
|
134 |
title = "Panel Demo - Image Classification"
|
|
|
9 |
|
10 |
pn.extension(design="bootstrap", sizing_mode="stretch_width")
|
11 |
|
12 |
+
ICON_URLS = {
|
13 |
+
"brand-github": "https://github.com/holoviz/panel",
|
14 |
+
"brand-twitter": "https://twitter.com/Panel_Org",
|
15 |
+
"brand-linkedin": "https://www.linkedin.com/company/panel-org",
|
16 |
+
"message-circle": "https://discourse.holoviz.org/",
|
17 |
+
"brand-discord": "https://discord.gg/AXRHnJU6sP",
|
|
|
18 |
}
|
19 |
|
20 |
|
|
|
118 |
)
|
119 |
|
120 |
# add footer
|
121 |
+
footer_row = pn.Row(pn.Spacer(), align="center")
|
122 |
+
for icon, url in ICON_URLS.items():
|
123 |
+
href_button = pn.widgets.Button(icon=icon, width=35, height=35)
|
124 |
+
href_button.js_on_click(code=f"window.open('{url}')")
|
125 |
+
footer_row.append(href_button)
|
126 |
+
footer_row.append(pn.Spacer())
|
127 |
|
128 |
# create dashboard
|
129 |
main = pn.WidgetBox(
|
130 |
input_widgets,
|
131 |
interactive_result,
|
132 |
+
footer_row,
|
133 |
)
|
134 |
|
135 |
title = "Panel Demo - Image Classification"
|