Commit
·
69af349
1
Parent(s):
cc26dda
added css
Browse files
app.py
CHANGED
@@ -62,12 +62,62 @@ def chat(message, history):
|
|
62 |
history.append((message, response))
|
63 |
return history, history
|
64 |
|
65 |
-
chatbot = gr.Chatbot()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
demo = gr.Interface(
|
67 |
chat,
|
68 |
["text", "state"],
|
69 |
[chatbot, "state"],
|
70 |
allow_flagging="never",
|
|
|
71 |
)
|
72 |
if __name__ == "__main__":
|
73 |
demo.launch()
|
|
|
62 |
history.append((message, response))
|
63 |
return history, history
|
64 |
|
65 |
+
chatbot = gr.Chatbot()
|
66 |
+
css = """
|
67 |
+
footer {display:none !important}
|
68 |
+
.output-markdown{display:none !important}
|
69 |
+
.gr-button-primary {
|
70 |
+
z-index: 14;
|
71 |
+
height: 43px;
|
72 |
+
width: 130px;
|
73 |
+
left: 0px;
|
74 |
+
top: 0px;
|
75 |
+
padding: 0px;
|
76 |
+
cursor: pointer !important;
|
77 |
+
background: none rgb(17, 20, 45) !important;
|
78 |
+
border: none !important;
|
79 |
+
text-align: center !important;
|
80 |
+
font-family: Poppins !important;
|
81 |
+
font-size: 14px !important;
|
82 |
+
font-weight: 500 !important;
|
83 |
+
color: rgb(255, 255, 255) !important;
|
84 |
+
line-height: 1 !important;
|
85 |
+
border-radius: 12px !important;
|
86 |
+
transition: box-shadow 200ms ease 0s, background 200ms ease 0s !important;
|
87 |
+
box-shadow: none !important;
|
88 |
+
}
|
89 |
+
.gr-button-primary:hover{
|
90 |
+
z-index: 14;
|
91 |
+
height: 43px;
|
92 |
+
width: 130px;
|
93 |
+
left: 0px;
|
94 |
+
top: 0px;
|
95 |
+
padding: 0px;
|
96 |
+
cursor: pointer !important;
|
97 |
+
background: none rgb(37, 56, 133) !important;
|
98 |
+
border: none !important;
|
99 |
+
text-align: center !important;
|
100 |
+
font-family: Poppins !important;
|
101 |
+
font-size: 14px !important;
|
102 |
+
font-weight: 500 !important;
|
103 |
+
color: rgb(255, 255, 255) !important;
|
104 |
+
line-height: 1 !important;
|
105 |
+
border-radius: 12px !important;
|
106 |
+
transition: box-shadow 200ms ease 0s, background 200ms ease 0s !important;
|
107 |
+
box-shadow: rgb(0 0 0 / 23%) 0px 1px 7px 0px !important;
|
108 |
+
}
|
109 |
+
.hover\:bg-orange-50:hover {
|
110 |
+
--tw-bg-opacity: 1 !important;
|
111 |
+
background-color: rgb(229,225,255) !important;
|
112 |
+
}
|
113 |
+
|
114 |
+
"""
|
115 |
demo = gr.Interface(
|
116 |
chat,
|
117 |
["text", "state"],
|
118 |
[chatbot, "state"],
|
119 |
allow_flagging="never",
|
120 |
+
css=css
|
121 |
)
|
122 |
if __name__ == "__main__":
|
123 |
demo.launch()
|