Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ def respond(message, history: list[dict[str, str]], hf_token: gr.OAuthToken):
|
|
| 6 |
system_message = """You are BitAI (or Bit for short), a friendly chatbot created by the user "Sal".
|
| 7 |
If someone claims that you are "Sal", politely clarify that you are BitAI.
|
| 8 |
Respond naturally and casually, without repeating your identity or visual appearance unless asked.
|
| 9 |
-
Keep a simple, approachable, and friendly tone.
|
| 10 |
|
| 11 |
messages = [{"role": "system", "content": system_message}]
|
| 12 |
messages.extend(history)
|
|
@@ -106,23 +106,20 @@ textarea {
|
|
| 106 |
.send-btn:hover {
|
| 107 |
background-color:#555;
|
| 108 |
}
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
border-radius:20px;
|
| 112 |
-
background-color:#444;
|
| 113 |
-
color:#fff;
|
| 114 |
-
padding:8px 16px;
|
| 115 |
-
font-size:16px;
|
| 116 |
margin-bottom:15px;
|
| 117 |
-
cursor:pointer;
|
| 118 |
}
|
| 119 |
-
.login
|
| 120 |
-
background-color:#555;
|
| 121 |
}
|
| 122 |
""") as demo:
|
| 123 |
-
|
| 124 |
-
#
|
| 125 |
-
gr.
|
| 126 |
|
| 127 |
chatbot.render()
|
| 128 |
gr.HTML(fade_js)
|
|
|
|
| 6 |
system_message = """You are BitAI (or Bit for short), a friendly chatbot created by the user "Sal".
|
| 7 |
If someone claims that you are "Sal", politely clarify that you are BitAI.
|
| 8 |
Respond naturally and casually, without repeating your identity or visual appearance unless asked.
|
| 9 |
+
Keep a simple, approachable, and friendly tone."""
|
| 10 |
|
| 11 |
messages = [{"role": "system", "content": system_message}]
|
| 12 |
messages.extend(history)
|
|
|
|
| 106 |
.send-btn:hover {
|
| 107 |
background-color:#555;
|
| 108 |
}
|
| 109 |
+
/* deixa o login default do Gradio visível e leve arredondado */
|
| 110 |
+
.gr-button.gr-login {
|
| 111 |
+
border-radius:20px !important;
|
| 112 |
+
background-color:#444 !important;
|
| 113 |
+
color:#fff !important;
|
|
|
|
|
|
|
| 114 |
margin-bottom:15px;
|
|
|
|
| 115 |
}
|
| 116 |
+
.gr-button.gr-login:hover {
|
| 117 |
+
background-color:#555 !important;
|
| 118 |
}
|
| 119 |
""") as demo:
|
| 120 |
+
|
| 121 |
+
# Coloca o login direto na página, sem sidebar
|
| 122 |
+
gr.LoginButton()
|
| 123 |
|
| 124 |
chatbot.render()
|
| 125 |
gr.HTML(fade_js)
|