Update app.py
Browse files
app.py
CHANGED
|
@@ -296,6 +296,7 @@ def chat_with_ai(message, history, role, audio_file=None):
|
|
| 296 |
messages_for_gradio.append({"role": "assistant", "content": bot_msg})
|
| 297 |
return format_history_for_gradio(history), history
|
| 298 |
|
|
|
|
| 299 |
def create_chatbot():
|
| 300 |
with gr.Blocks(
|
| 301 |
theme='Nymbo/Alyx_Theme',
|
|
@@ -305,32 +306,17 @@ def create_chatbot():
|
|
| 305 |
font-size: 14px;
|
| 306 |
color: #73c2fb;
|
| 307 |
}
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
.gr-block.gr-box {
|
| 316 |
-
padding: 0 !important;
|
| 317 |
-
max-width: 100% !important;
|
| 318 |
-
width: 100% !important;
|
| 319 |
-
}
|
| 320 |
-
|
| 321 |
-
body {
|
| 322 |
-
margin: 0 !important;
|
| 323 |
-
padding: 0 !important;
|
| 324 |
-
}
|
| 325 |
-
|
| 326 |
-
.gr-row, .gr-column {
|
| 327 |
-
width: 100% !important;
|
| 328 |
-
max-width: 100% !important;
|
| 329 |
-
flex-wrap: wrap !important;
|
| 330 |
}
|
| 331 |
""") as demo:
|
| 332 |
with gr.Tab("Chatbot"):
|
| 333 |
-
chatbot = gr.Chatbot(type='messages')
|
| 334 |
audio_output = gr.Audio(type="filepath", visible=False, autoplay=True)
|
| 335 |
state = gr.State([])
|
| 336 |
|
|
|
|
| 296 |
messages_for_gradio.append({"role": "assistant", "content": bot_msg})
|
| 297 |
return format_history_for_gradio(history), history
|
| 298 |
|
| 299 |
+
|
| 300 |
def create_chatbot():
|
| 301 |
with gr.Blocks(
|
| 302 |
theme='Nymbo/Alyx_Theme',
|
|
|
|
| 306 |
font-size: 14px;
|
| 307 |
color: #73c2fb;
|
| 308 |
}
|
| 309 |
+
#chatbot-box {
|
| 310 |
+
height: 700px !important; /* You can increase this as needed */
|
| 311 |
+
max-height: 90vh;
|
| 312 |
+
overflow-y: auto;
|
| 313 |
+
border: 1px solid #555;
|
| 314 |
+
padding: 10px;
|
| 315 |
+
border-radius: 8px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
}
|
| 317 |
""") as demo:
|
| 318 |
with gr.Tab("Chatbot"):
|
| 319 |
+
chatbot = gr.Chatbot(type='messages', elem_id="chatbot-box")
|
| 320 |
audio_output = gr.Audio(type="filepath", visible=False, autoplay=True)
|
| 321 |
state = gr.State([])
|
| 322 |
|