Spaces:
Running
Running
yizhangliu
commited on
Commit
•
8cabc95
1
Parent(s):
23e2e2a
Update share_btn.py
Browse files- share_btn.py +18 -3
share_btn.py
CHANGED
@@ -4,10 +4,25 @@ community_icon_html = """<svg id="share-btn-share-icon" xmlns="http://www.w3.org
|
|
4 |
</svg>"""
|
5 |
|
6 |
loading_icon_html = """<svg id="share-btn-loading-icon" style="display:none;" class="animate-spin"
|
7 |
-
style="color: #ffffff;
|
8 |
-
"
|
9 |
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" fill="none" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><circle style="opacity: 0.25;" cx="12" cy="12" r="10" stroke="white" stroke-width="4"></circle><path style="opacity: 0.75;" fill="white" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg>"""
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
share_js = """async () => {
|
12 |
async function uploadFile(file){
|
13 |
const UPLOAD_URL = 'https://huggingface.co/uploads';
|
@@ -86,4 +101,4 @@ share_js = """async () => {
|
|
86 |
shareIconEl.style.removeProperty('display');
|
87 |
loadingIconEl.style.display = 'none';
|
88 |
|
89 |
-
}"""
|
|
|
4 |
</svg>"""
|
5 |
|
6 |
loading_icon_html = """<svg id="share-btn-loading-icon" style="display:none;" class="animate-spin"
|
7 |
+
style="color: #ffffff; "
|
|
|
8 |
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" fill="none" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><circle style="opacity: 0.25;" cx="12" cy="12" r="10" stroke="white" stroke-width="4"></circle><path style="opacity: 0.75;" fill="white" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg>"""
|
9 |
|
10 |
+
download_icon_html = """<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> <image id="image0" width="24" height="24" x="0" y="0"
|
11 |
+
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAAAAADFHGIkAAAABGdBTUEAALGPC/xhBQAAACBjSFJN
|
12 |
+
AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJcEhZ
|
13 |
+
cwAADsMAAA7DAcdvqGQAAAAHdElNRQfmCxAEABlIYjStAAAAAW9yTlQBz6J3mgAAAThJREFUKM9N
|
14 |
+
kT1uVHEMxH/+eClQkJB2lVPkBBENiUSNcgUK7rE3gFwACQ5AnYKKmk16kBAnAIVq928PRfblrQvb
|
15 |
+
47Eta2ziYJLTZjP0ORkmkI0Z29ME9NJ2TMhmB0AudX3hjT0xx6tec7uAXFLtjjYdEzax1HGaggK1
|
16 |
+
5uMKlFgHRIVZgehwhTAHF010kyEshMoaxzC8Hi4+0m2fXz0UHhiJTHTsfrw7KT69fbF7PlJy0E4a
|
17 |
+
Kt2t8uwsV1tJLQ0hqf580NDdKmJ9r6H3f7slpNbG7iVt1+vvkra+kVoJRp/8OnfOf/IM+vfUYKRg
|
18 |
+
XG1u4tQpgv53s7/aJ6CWdM2UkdOUkRPXklqmMq/49tUaQ7guX1a0wgQjq6eDsLK9x0gwMRLQQdnH
|
19 |
+
OBLbJ+UdgACDRzhMIw+ftSUw8j+K6bj3uR+D8wAAABplWElmTU0AKgAAAAgAAQESAAMAAAABAAEA
|
20 |
+
AAAAAAATwHXnAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTExLTE2VDA0OjAwOjI1KzAwOjAwlNr0
|
21 |
+
hwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0xMS0xNlQwNDowMDoyNSswMDowMOWHTDsAAAAodEVY
|
22 |
+
dGRhdGU6dGltZXN0YW1wADIwMjItMTEtMTZUMDQ6MDA6MjUrMDA6MDCykm3kAAAAAElFTkSuQmCC" />
|
23 |
+
</svg>
|
24 |
+
"""
|
25 |
+
|
26 |
share_js = """async () => {
|
27 |
async function uploadFile(file){
|
28 |
const UPLOAD_URL = 'https://huggingface.co/uploads';
|
|
|
101 |
shareIconEl.style.removeProperty('display');
|
102 |
loadingIconEl.style.display = 'none';
|
103 |
|
104 |
+
}"""
|