VenkateshRoshan
commited on
Commit
·
427a4f5
1
Parent(s):
68cefcd
check_1
Browse files
app.py
CHANGED
@@ -58,6 +58,12 @@ demo = gr.ChatInterface(
|
|
58 |
],
|
59 |
)
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
if __name__ == "__main__":
|
63 |
demo.launch()
|
|
|
58 |
],
|
59 |
)
|
60 |
|
61 |
+
# read css file
|
62 |
+
def readCSS(file):
|
63 |
+
with open(file) as f:
|
64 |
+
return f.read()
|
65 |
+
|
66 |
+
demo.css = readCSS("style.css")
|
67 |
|
68 |
if __name__ == "__main__":
|
69 |
demo.launch()
|
style.css
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* styles.css */
|
2 |
+
#chatbox {
|
3 |
+
background-color: #ece5dd;
|
4 |
+
border-radius: 8px;
|
5 |
+
max-height: 400px;
|
6 |
+
overflow-y: auto;
|
7 |
+
padding: 10px;
|
8 |
+
display: flex;
|
9 |
+
flex-direction: column;
|
10 |
+
}
|
11 |
+
|
12 |
+
.message {
|
13 |
+
margin-bottom: 10px;
|
14 |
+
display: flex;
|
15 |
+
align-items: center;
|
16 |
+
}
|
17 |
+
|
18 |
+
.message.user {
|
19 |
+
justify-content: flex-end;
|
20 |
+
}
|
21 |
+
|
22 |
+
.message.bot {
|
23 |
+
justify-content: flex-start;
|
24 |
+
}
|
25 |
+
|
26 |
+
.message .text {
|
27 |
+
background-color: #ffffff;
|
28 |
+
border-radius: 10px;
|
29 |
+
padding: 10px;
|
30 |
+
max-width: 80%;
|
31 |
+
line-height: 1.4;
|
32 |
+
}
|
33 |
+
|
34 |
+
.message.user .text {
|
35 |
+
background-color: #dcf8c6;
|
36 |
+
}
|
37 |
+
|
38 |
+
.message.bot .text {
|
39 |
+
background-color: #ffffff;
|
40 |
+
}
|
41 |
+
|
42 |
+
.message .timestamp {
|
43 |
+
font-size: 0.8em;
|
44 |
+
color: #999;
|
45 |
+
}
|
46 |
+
|
47 |
+
#input-box {
|
48 |
+
margin-top: 10px;
|
49 |
+
display: flex;
|
50 |
+
}
|
51 |
+
|
52 |
+
#input-box textarea {
|
53 |
+
width: 80%;
|
54 |
+
border: 1px solid #ccc;
|
55 |
+
border-radius: 5px;
|
56 |
+
padding: 10px;
|
57 |
+
resize: none;
|
58 |
+
}
|
59 |
+
|
60 |
+
#input-box button {
|
61 |
+
width: 20%;
|
62 |
+
border: none;
|
63 |
+
border-radius: 5px;
|
64 |
+
background-color: #007bff;
|
65 |
+
color: white;
|
66 |
+
cursor: pointer;
|
67 |
+
padding: 10px;
|
68 |
+
}
|
utils.py
CHANGED
@@ -1 +1,2 @@
|
|
1 |
-
import numpy as np
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
|