Spaces:
Runtime error
Runtime error
Removed icons
Browse files
app.py
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
import io
|
2 |
import random
|
3 |
-
import
|
4 |
-
import aiohttp
|
5 |
|
|
|
|
|
6 |
from PIL import Image
|
7 |
-
|
8 |
-
from transformers import CLIPProcessor, CLIPModel
|
9 |
-
from typing import List, Tuple
|
10 |
|
11 |
pn.extension(design="bootstrap", sizing_mode="stretch_width")
|
12 |
|
13 |
-
|
14 |
-
"
|
15 |
-
"
|
16 |
-
"
|
17 |
-
"
|
18 |
-
"
|
|
|
19 |
}
|
20 |
|
21 |
|
@@ -119,18 +119,16 @@ interactive_result = pn.panel(
|
|
119 |
)
|
120 |
|
121 |
# add footer
|
122 |
-
|
123 |
-
for
|
124 |
-
|
125 |
-
|
126 |
-
footer_row.append(href_button)
|
127 |
-
footer_row.append(pn.Spacer())
|
128 |
|
129 |
# create dashboard
|
130 |
main = pn.WidgetBox(
|
131 |
input_widgets,
|
132 |
interactive_result,
|
133 |
-
|
134 |
)
|
135 |
|
136 |
title = "Panel Demo - Image Classification"
|
|
|
1 |
import io
|
2 |
import random
|
3 |
+
from typing import List, Tuple
|
|
|
4 |
|
5 |
+
import aiohttp
|
6 |
+
import panel as pn
|
7 |
from PIL import Image
|
8 |
+
from transformers import CLIPModel, CLIPProcessor
|
|
|
|
|
9 |
|
10 |
pn.extension(design="bootstrap", sizing_mode="stretch_width")
|
11 |
|
12 |
+
EXTERNAL_LINKS = {
|
13 |
+
"Source Code": "https://huggingface.co/spaces/Panel-Org/panel-template/blob/main/app.py",
|
14 |
+
"GitHub": "https://github.com/holoviz/panel",
|
15 |
+
"Twitter": "https://twitter.com/Panel_Org",
|
16 |
+
"LinkedIn": "https://www.linkedin.com/company/panel-org",
|
17 |
+
"Discourse": "https://discourse.holoviz.org/",
|
18 |
+
"Discord": "https://discord.gg/AXRHnJU6sP",
|
19 |
}
|
20 |
|
21 |
|
|
|
119 |
)
|
120 |
|
121 |
# add footer
|
122 |
+
footer = pn.pane.Markdown(
|
123 |
+
" | ".join(f"[{name}]({link})" for name, link in EXTERNAL_LINKS.items()),
|
124 |
+
justify="center",
|
125 |
+
)
|
|
|
|
|
126 |
|
127 |
# create dashboard
|
128 |
main = pn.WidgetBox(
|
129 |
input_widgets,
|
130 |
interactive_result,
|
131 |
+
footer,
|
132 |
)
|
133 |
|
134 |
title = "Panel Demo - Image Classification"
|