Spaces:
Sleeping
Sleeping
Fazeel Asghar
commited on
Commit
·
90a1af0
1
Parent(s):
3671540
Changed made in UI
Browse files
app.py
CHANGED
|
@@ -48,17 +48,17 @@ def clear_session(session_id):
|
|
| 48 |
|
| 49 |
with gr.Blocks(css="""
|
| 50 |
body {
|
| 51 |
-
background-color: #
|
| 52 |
-
color: #
|
| 53 |
font-family: 'Segoe UI', sans-serif;
|
| 54 |
}
|
| 55 |
.header {
|
| 56 |
text-align: center;
|
| 57 |
font-size: 1.8rem;
|
| 58 |
padding: 1rem;
|
| 59 |
-
background-color: #
|
| 60 |
color: #ffffff;
|
| 61 |
-
border-bottom: 1px solid #
|
| 62 |
}
|
| 63 |
.chatbot {
|
| 64 |
flex: 1;
|
|
@@ -67,28 +67,21 @@ body {
|
|
| 67 |
height: 65vh;
|
| 68 |
overflow-y: auto;
|
| 69 |
padding: 1rem;
|
| 70 |
-
background-color: #1E1E1E;
|
| 71 |
-
border-radius: 12px;
|
| 72 |
-
margin-bottom: 1rem;
|
| 73 |
}
|
| 74 |
.chatbot .message {
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
line-height: 1.5;
|
| 81 |
-
word-break: break-word;
|
| 82 |
}
|
| 83 |
.chatbot .message.user {
|
| 84 |
-
background-color: #2979FF;
|
| 85 |
-
color: white;
|
| 86 |
align-self: flex-end;
|
|
|
|
| 87 |
}
|
| 88 |
.chatbot .message.bot {
|
| 89 |
-
background-color: #2C2C2C;
|
| 90 |
-
color: #E0E0E0;
|
| 91 |
align-self: flex-start;
|
|
|
|
| 92 |
}
|
| 93 |
.input-section {
|
| 94 |
display: flex;
|
|
@@ -96,15 +89,12 @@ body {
|
|
| 96 |
align-items: center;
|
| 97 |
margin-top: auto;
|
| 98 |
}
|
| 99 |
-
input, button {
|
| 100 |
-
font-size: 1rem;
|
| 101 |
-
}
|
| 102 |
.send-button {
|
| 103 |
background-color: #2979FF;
|
| 104 |
color: white;
|
| 105 |
-
border: none;
|
| 106 |
padding: 10px 16px;
|
| 107 |
-
border-radius:
|
|
|
|
| 108 |
cursor: pointer;
|
| 109 |
}
|
| 110 |
.send-button:hover {
|
|
@@ -118,7 +108,7 @@ input, button {
|
|
| 118 |
}
|
| 119 |
""") as demo:
|
| 120 |
|
| 121 |
-
gr.Markdown("## 🤖 Smart Assistant
|
| 122 |
|
| 123 |
state = gr.State([])
|
| 124 |
|
|
|
|
| 48 |
|
| 49 |
with gr.Blocks(css="""
|
| 50 |
body {
|
| 51 |
+
background-color: #1e1e1e;
|
| 52 |
+
color: #ddd;
|
| 53 |
font-family: 'Segoe UI', sans-serif;
|
| 54 |
}
|
| 55 |
.header {
|
| 56 |
text-align: center;
|
| 57 |
font-size: 1.8rem;
|
| 58 |
padding: 1rem;
|
| 59 |
+
background-color: #2c2c2c;
|
| 60 |
color: #ffffff;
|
| 61 |
+
border-bottom: 1px solid #444;
|
| 62 |
}
|
| 63 |
.chatbot {
|
| 64 |
flex: 1;
|
|
|
|
| 67 |
height: 65vh;
|
| 68 |
overflow-y: auto;
|
| 69 |
padding: 1rem;
|
|
|
|
|
|
|
|
|
|
| 70 |
}
|
| 71 |
.chatbot .message {
|
| 72 |
+
margin: 6px 0;
|
| 73 |
+
white-space: pre-wrap;
|
| 74 |
+
word-wrap: break-word;
|
| 75 |
+
line-height: 1.6;
|
| 76 |
+
font-size: 1rem;
|
|
|
|
|
|
|
| 77 |
}
|
| 78 |
.chatbot .message.user {
|
|
|
|
|
|
|
| 79 |
align-self: flex-end;
|
| 80 |
+
color: #90caf9;
|
| 81 |
}
|
| 82 |
.chatbot .message.bot {
|
|
|
|
|
|
|
| 83 |
align-self: flex-start;
|
| 84 |
+
color: #e0e0e0;
|
| 85 |
}
|
| 86 |
.input-section {
|
| 87 |
display: flex;
|
|
|
|
| 89 |
align-items: center;
|
| 90 |
margin-top: auto;
|
| 91 |
}
|
|
|
|
|
|
|
|
|
|
| 92 |
.send-button {
|
| 93 |
background-color: #2979FF;
|
| 94 |
color: white;
|
|
|
|
| 95 |
padding: 10px 16px;
|
| 96 |
+
border-radius: 8px;
|
| 97 |
+
border: none;
|
| 98 |
cursor: pointer;
|
| 99 |
}
|
| 100 |
.send-button:hover {
|
|
|
|
| 108 |
}
|
| 109 |
""") as demo:
|
| 110 |
|
| 111 |
+
gr.Markdown("## 🤖 Smart Assistant", elem_classes="header")
|
| 112 |
|
| 113 |
state = gr.State([])
|
| 114 |
|