Spaces:
Running
Running
#!/usr/bin/env python | |
from __future__ import annotations | |
def create_tag_dom(label, ignore, prob): | |
result_html = '' | |
if ignore: | |
result_html += '<div class="m5dd_list">' | |
else: | |
result_html += '<div class="m5dd_list use">' | |
result_html += '<span class="add action">β</span>' | |
result_html += '<span class="dec action">β</span>' | |
result_html += '<span class="label action">' + str(label) + '</span>' | |
result_html += '<span class="prob">' + str(round(prob, 3)) + '</span>' | |
result_html += '<span class="up action">πΌ</span>' | |
result_html += '<span class="down action">π½</span>' | |
result_html += '<a class="wiki action" href="https://danbooru.donmai.us/wiki_pages/' + label + '" target="_blank">π</a>' | |
result_html += '</div>' | |
return result_html | |