Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,20 +70,16 @@ def render_message(history):
|
|
| 70 |
|
| 71 |
return messages_html
|
| 72 |
|
| 73 |
-
with gr.Blocks(css=".chatbox {height: 400px; overflow-y: auto;}") as demo:
|
| 74 |
-
gr.Markdown("## P-MSQ Chat Interface
|
| 75 |
-
gr.Markdown("""
|
| 76 |
-
Welcome to the **P-MSQ** (Messaging Service Query) chat interface!
|
| 77 |
-
You are interacting with a friendly AI chatbot that can assist you in various situations.
|
| 78 |
-
Use the text input box below to start chatting.
|
| 79 |
-
""")
|
| 80 |
|
| 81 |
-
chatbot_output = gr.HTML(elem_id="chatbox", label="Chat History"
|
| 82 |
|
| 83 |
msg_input = gr.Textbox(
|
| 84 |
show_label=False,
|
| 85 |
placeholder="Type your message and press Enter...",
|
| 86 |
-
lines=2
|
|
|
|
| 87 |
)
|
| 88 |
|
| 89 |
send_btn = gr.Button("Send")
|
|
@@ -126,5 +122,33 @@ with gr.Blocks(css=".chatbox {height: 400px; overflow-y: auto;}") as demo:
|
|
| 126 |
send_btn
|
| 127 |
regen_btn
|
| 128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
if __name__ == "__main__":
|
| 130 |
demo.launch()
|
|
|
|
| 70 |
|
| 71 |
return messages_html
|
| 72 |
|
| 73 |
+
with gr.Blocks(css=".chatbox {height: 400px; overflow-y: auto; border: 1px solid #ccc; padding: 10px; background-color: #f9f9f9;}") as demo:
|
| 74 |
+
gr.Markdown("## P-MSQ Chat Interface")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
+
chatbot_output = gr.HTML(elem_id="chatbox", label="Chat History", interactive=False)
|
| 77 |
|
| 78 |
msg_input = gr.Textbox(
|
| 79 |
show_label=False,
|
| 80 |
placeholder="Type your message and press Enter...",
|
| 81 |
+
lines=2,
|
| 82 |
+
elem_id="input-text"
|
| 83 |
)
|
| 84 |
|
| 85 |
send_btn = gr.Button("Send")
|
|
|
|
| 122 |
send_btn
|
| 123 |
regen_btn
|
| 124 |
|
| 125 |
+
gr.HTML("""
|
| 126 |
+
<style>
|
| 127 |
+
#chatbox {
|
| 128 |
+
max-height: 400px;
|
| 129 |
+
overflow-y: auto;
|
| 130 |
+
border: 1px solid #ccc;
|
| 131 |
+
background-color: #f9f9f9;
|
| 132 |
+
padding: 10px;
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
#input-text {
|
| 136 |
+
width: 100%;
|
| 137 |
+
box-sizing: border-box;
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
.gr-button {
|
| 141 |
+
margin: 5px;
|
| 142 |
+
padding: 8px 16px;
|
| 143 |
+
font-size: 14px;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
.gr-row {
|
| 147 |
+
justify-content: flex-end;
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
</style>
|
| 151 |
+
""")
|
| 152 |
+
|
| 153 |
if __name__ == "__main__":
|
| 154 |
demo.launch()
|