Solarum Asteridion commited on
Commit
0630033
·
verified ·
1 Parent(s): e982cb7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -24
app.py CHANGED
@@ -93,7 +93,7 @@ with gr.Blocks(css="""
93
  padding: 20px;
94
  }
95
  #chatbot {
96
- height: 500px;
97
  overflow-y: auto;
98
  background-color: #ffffff;
99
  border-radius: 10px;
@@ -113,7 +113,7 @@ with gr.Blocks(css="""
113
  #send-button {
114
  background-color: #007BFF;
115
  color: white;
116
- padding: 10px 20px;
117
  border: none;
118
  border-radius: 50%;
119
  cursor: pointer;
@@ -128,19 +128,6 @@ with gr.Blocks(css="""
128
  #send-button:hover {
129
  background-color: #0056b3;
130
  }
131
- #clear-button {
132
- background-color: #dc3545;
133
- color: white;
134
- padding: 10px 20px;
135
- border: none;
136
- border-radius: 5px;
137
- cursor: pointer;
138
- margin-top: 10px;
139
- font-size: 14px;
140
- }
141
- #clear-button:hover {
142
- background-color: #c82333;
143
- }
144
  .message {
145
  margin-bottom: 10px;
146
  }
@@ -183,9 +170,7 @@ with gr.Blocks(css="""
183
  elem_id="textbox"
184
  )
185
  send = gr.Button("➤", elem_id="send-button")
186
- with gr.Row():
187
- clear = gr.Button("Clear Chat", elem_id="clear-button")
188
-
189
  def update_chat(user_message, history):
190
  if user_message.strip() == "":
191
  return history, history # Do not process empty messages
@@ -203,11 +188,5 @@ with gr.Blocks(css="""
203
  inputs=[msg, chatbot],
204
  outputs=[chatbot, chatbot]
205
  )
206
-
207
- clear.click(
208
- lambda: ([], []),
209
- inputs=None,
210
- outputs=[chatbot, chatbot]
211
- )
212
 
213
  demo.launch()
 
93
  padding: 20px;
94
  }
95
  #chatbot {
96
+ height: 600px; /* Increased height for a bigger chat box */
97
  overflow-y: auto;
98
  background-color: #ffffff;
99
  border-radius: 10px;
 
113
  #send-button {
114
  background-color: #007BFF;
115
  color: white;
116
+ padding: 0;
117
  border: none;
118
  border-radius: 50%;
119
  cursor: pointer;
 
128
  #send-button:hover {
129
  background-color: #0056b3;
130
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  .message {
132
  margin-bottom: 10px;
133
  }
 
170
  elem_id="textbox"
171
  )
172
  send = gr.Button("➤", elem_id="send-button")
173
+
 
 
174
  def update_chat(user_message, history):
175
  if user_message.strip() == "":
176
  return history, history # Do not process empty messages
 
188
  inputs=[msg, chatbot],
189
  outputs=[chatbot, chatbot]
190
  )
 
 
 
 
 
 
191
 
192
  demo.launch()