数字順に並べ替えさせるようにした
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ name2fileid = json.loads(Path("name2fileid.json").read_text())
|
|
14 |
|
15 |
def fileids2html(fileids, query):
|
16 |
html = BeautifulSoup("<div></div>", "html.parser")
|
17 |
-
for fileid in sorted(list(fileids), reverse=True):
|
18 |
src = "https://huggingface.co/front/assets/huggingface_logo-noborder.svg"
|
19 |
if fileid in fileid2image:
|
20 |
src = fileid2image[fileid.strip()]
|
|
|
14 |
|
15 |
def fileids2html(fileids, query):
|
16 |
html = BeautifulSoup("<div></div>", "html.parser")
|
17 |
+
for fileid in sorted(list(fileids), reverse=True, key=lambda x:int(x)):
|
18 |
src = "https://huggingface.co/front/assets/huggingface_logo-noborder.svg"
|
19 |
if fileid in fileid2image:
|
20 |
src = fileid2image[fileid.strip()]
|