Spaces:
Runtime error
Runtime error
Commit
·
5e74770
1
Parent(s):
d8101cd
Update app.py
Browse files
app.py
CHANGED
@@ -101,9 +101,9 @@ def login_up_nft(info, u_verify, u_id, u_key, sid, cid, ava_image, log_into_publ
|
|
101 |
|
102 |
def status():
|
103 |
global GLOBAL_STATE_SUCCESS, SUCCESS_UIDS
|
104 |
-
text = ""
|
105 |
for u in SUCCESS_UIDS:
|
106 |
-
text = text + "UID: " + u["uid"] + " 于 " + u["time"] + " 成功设置数字头像。" + "\n
|
107 |
if text == "":
|
108 |
text = "好像从本次更新/系统重启开始还没有人设置数字头像呢~"
|
109 |
return text
|
@@ -116,7 +116,6 @@ with gr.Blocks() as application:
|
|
116 |
key = gr.State("")
|
117 |
uid = gr.State("")
|
118 |
with gr.Tab("BiliBili自定义数字头像"):
|
119 |
-
# gr.Markdown("自本次更新/系统重启以来,已成功为用户设置 " + str(GLOBAL_STATE_SUCCESS) + " 次头像。")
|
120 |
gr.Markdown("第一步:")
|
121 |
gr.Markdown("""获取一个最低R级的数字周边,多关注官方活动。如果列表中没有最新的卡组,请耐心等待兼容更新。""")
|
122 |
gr.Markdown("第二步:")
|
@@ -135,7 +134,6 @@ with gr.Blocks() as application:
|
|
135 |
|
136 |
最后点击按钮<验证并提交头像>等待完成显示结果(成功可能需要时间审核)""")
|
137 |
with gr.Row():
|
138 |
-
log_into_public = True #gr.Checkbox(label="展示UID到下方展示区", value=True)
|
139 |
sid_drop = gr.Dropdown(label="卡组", choices=list(sid_map.keys()), value="无")
|
140 |
card_list_drop = gr.Dropdown(label="指定已有底卡")
|
141 |
set_button = gr.Button("验证并提交头像")
|
@@ -157,7 +155,7 @@ with gr.Blocks() as application:
|
|
157 |
sid_drop.change(back_card_id_list, inputs=[login_info, verify, uid, key, sid_drop],
|
158 |
outputs=[card_id_list, verify, uid, key, card_list_drop, code_output])
|
159 |
card_list_drop.change(name_get_card_id, inputs=[card_id_list, card_list_drop], outputs=[card_id])
|
160 |
-
set_button.click(login_up_nft, inputs=[login_info, verify, uid, key, sid_drop, card_id, image_ava
|
161 |
outputs=[verify, uid, key, code_output])
|
162 |
status_button.click(status, inputs=[], outputs=[status_output])
|
163 |
|
|
|
101 |
|
102 |
def status():
|
103 |
global GLOBAL_STATE_SUCCESS, SUCCESS_UIDS
|
104 |
+
text = "自本次更新/系统重启以来,已成功为用户设置 " + str(GLOBAL_STATE_SUCCESS) + " 次头像。" + "\n"
|
105 |
for u in SUCCESS_UIDS:
|
106 |
+
text = text + "UID: " + u["uid"] + " 于 " + u["time"] + " 成功设置数字头像。" + "\n"
|
107 |
if text == "":
|
108 |
text = "好像从本次更新/系统重启开始还没有人设置数字头像呢~"
|
109 |
return text
|
|
|
116 |
key = gr.State("")
|
117 |
uid = gr.State("")
|
118 |
with gr.Tab("BiliBili自定义数字头像"):
|
|
|
119 |
gr.Markdown("第一步:")
|
120 |
gr.Markdown("""获取一个最低R级的数字周边,多关注官方活动。如果列表中没有最新的卡组,请耐心等待兼容更新。""")
|
121 |
gr.Markdown("第二步:")
|
|
|
134 |
|
135 |
最后点击按钮<验证并提交头像>等待完成显示结果(成功可能需要时间审核)""")
|
136 |
with gr.Row():
|
|
|
137 |
sid_drop = gr.Dropdown(label="卡组", choices=list(sid_map.keys()), value="无")
|
138 |
card_list_drop = gr.Dropdown(label="指定已有底卡")
|
139 |
set_button = gr.Button("验证并提交头像")
|
|
|
155 |
sid_drop.change(back_card_id_list, inputs=[login_info, verify, uid, key, sid_drop],
|
156 |
outputs=[card_id_list, verify, uid, key, card_list_drop, code_output])
|
157 |
card_list_drop.change(name_get_card_id, inputs=[card_id_list, card_list_drop], outputs=[card_id])
|
158 |
+
set_button.click(login_up_nft, inputs=[login_info, verify, uid, key, sid_drop, card_id, image_ava],
|
159 |
outputs=[verify, uid, key, code_output])
|
160 |
status_button.click(status, inputs=[], outputs=[status_output])
|
161 |
|