Salt40404 commited on
Commit
6084e6a
·
verified ·
1 Parent(s): 3b89673

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -14
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. you can express yourself, if user message is a bit too much insane of bad, you say 'i cannot answer this.'. """
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
- .login-btn {
110
- border:none;
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-btn:hover {
120
- background-color:#555;
121
  }
122
  """) as demo:
123
-
124
- # Botão de login direto no topo
125
- gr.Button("Login", elem_classes=["login-btn"])
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)