Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -129,16 +129,15 @@ custom_css = """
|
|
| 129 |
margin-bottom: 20px;
|
| 130 |
color: #4a6572;
|
| 131 |
}
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
background-color: #ffffff !important;
|
| 138 |
-
border-radius: 12px !important;
|
| 139 |
}
|
| 140 |
"""
|
| 141 |
|
|
|
|
| 142 |
if __name__ == "__main__":
|
| 143 |
me = Me()
|
| 144 |
|
|
@@ -147,7 +146,7 @@ if __name__ == "__main__":
|
|
| 147 |
gr.HTML("<div id='title'>💼 Sidney Chen 行政專家 AI 聊天機器人</div>")
|
| 148 |
gr.HTML("<div id='subtitle'>歡迎詢問職涯、行政流程、經驗背景等資訊</div>")
|
| 149 |
|
| 150 |
-
chatbot = gr.Chatbot(label="與 Sidney 對話", type="messages") #
|
| 151 |
chat = gr.ChatInterface(fn=me.chat, chatbot=chatbot, type="messages") # 移除 show_copy_button
|
| 152 |
|
| 153 |
demo.launch()
|
|
|
|
| 129 |
margin-bottom: 20px;
|
| 130 |
color: #4a6572;
|
| 131 |
}
|
| 132 |
+
/* 去掉訊息氣泡背景,純文字顯示 */
|
| 133 |
+
.message.user, .message.bot {
|
| 134 |
+
background-color: transparent !important;
|
| 135 |
+
border-radius: 0 !important;
|
| 136 |
+
padding: 4px 0 !important;
|
|
|
|
|
|
|
| 137 |
}
|
| 138 |
"""
|
| 139 |
|
| 140 |
+
|
| 141 |
if __name__ == "__main__":
|
| 142 |
me = Me()
|
| 143 |
|
|
|
|
| 146 |
gr.HTML("<div id='title'>💼 Sidney Chen 行政專家 AI 聊天機器人</div>")
|
| 147 |
gr.HTML("<div id='subtitle'>歡迎詢問職涯、行政流程、經驗背景等資訊</div>")
|
| 148 |
|
| 149 |
+
chatbot = gr.Chatbot(label="與 Sidney 對話", type="messages") # 使用 messages 格式
|
| 150 |
chat = gr.ChatInterface(fn=me.chat, chatbot=chatbot, type="messages") # 移除 show_copy_button
|
| 151 |
|
| 152 |
demo.launch()
|