Spaces:
Sleeping
Sleeping
Keldos commited on
Commit ·
f9d9c8c
1
Parent(s): eea6f06
chore: 当未设置用户时不显示用户名
Browse files- ChuanhuChatbot.py +1 -1
ChuanhuChatbot.py
CHANGED
|
@@ -40,7 +40,7 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
|
|
| 40 |
logging.info(f"Get User Name: {request.username}")
|
| 41 |
return gr.Markdown.update(value=f"User: {request.username}"), request.username
|
| 42 |
else:
|
| 43 |
-
return gr.Markdown.update(value=f"User:
|
| 44 |
demo.load(create_greeting, inputs=None, outputs=[user_info, user_name])
|
| 45 |
|
| 46 |
with gr.Row().style(equal_height=True):
|
|
|
|
| 40 |
logging.info(f"Get User Name: {request.username}")
|
| 41 |
return gr.Markdown.update(value=f"User: {request.username}"), request.username
|
| 42 |
else:
|
| 43 |
+
return gr.Markdown.update(value=f"User: default", visible=False), ""
|
| 44 |
demo.load(create_greeting, inputs=None, outputs=[user_info, user_name])
|
| 45 |
|
| 46 |
with gr.Row().style(equal_height=True):
|