VenkateshRoshan
commited on
Commit
·
d10de86
1
Parent(s):
3452f40
check_1
Browse files
app.py
CHANGED
@@ -60,78 +60,25 @@ For information on how to customize the ChatInterface, peruse the gradio docs: h
|
|
60 |
|
61 |
custom_css = """
|
62 |
/* styles.css */
|
63 |
-
|
64 |
-
background-color: #
|
65 |
-
border-radius: 8px;
|
66 |
-
max-height: 400px;
|
67 |
-
overflow-y: auto;
|
68 |
-
padding: 10px;
|
69 |
-
display: flex;
|
70 |
-
flex-direction: column;
|
71 |
-
}
|
72 |
-
|
73 |
-
.message {
|
74 |
-
margin-bottom: 10px;
|
75 |
-
display: flex;
|
76 |
-
align-items: center;
|
77 |
-
}
|
78 |
-
|
79 |
-
.message.user {
|
80 |
-
justify-content: flex-end;
|
81 |
-
}
|
82 |
-
|
83 |
-
.message.bot {
|
84 |
-
justify-content: flex-start;
|
85 |
-
}
|
86 |
-
|
87 |
-
.message .text {
|
88 |
-
background-color: #ffffff;
|
89 |
-
border-radius: 10px;
|
90 |
-
padding: 10px;
|
91 |
-
max-width: 80%;
|
92 |
-
line-height: 1.4;
|
93 |
-
}
|
94 |
-
|
95 |
-
.message.user .text {
|
96 |
-
background-color: #dcf8c6;
|
97 |
-
}
|
98 |
-
|
99 |
-
.message.bot .text {
|
100 |
-
background-color: #ffffff;
|
101 |
-
}
|
102 |
-
|
103 |
-
.message .timestamp {
|
104 |
-
font-size: 0.8em;
|
105 |
-
color: #999;
|
106 |
-
}
|
107 |
-
|
108 |
-
#input-box {
|
109 |
-
margin-top: 10px;
|
110 |
-
display: flex;
|
111 |
-
}
|
112 |
-
|
113 |
-
#input-box textarea {
|
114 |
-
width: 80%;
|
115 |
-
border: 1px solid #ccc;
|
116 |
-
border-radius: 5px;
|
117 |
-
padding: 10px;
|
118 |
-
resize: none;
|
119 |
-
}
|
120 |
-
|
121 |
-
#input-box button {
|
122 |
-
width: 20%;
|
123 |
border: none;
|
124 |
-
border-radius: 5px;
|
125 |
-
background-color: #007bff;
|
126 |
color: white;
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
cursor: pointer;
|
128 |
-
padding: 10px;
|
129 |
}
|
130 |
|
131 |
"""
|
132 |
|
133 |
with gr.Blocks(css=custom_css) as demo:
|
134 |
gr.Markdown("## Zephyr Chatbot")
|
|
|
|
|
135 |
|
136 |
if __name__ == "__main__":
|
137 |
demo.launch()
|
|
|
60 |
|
61 |
custom_css = """
|
62 |
/* styles.css */
|
63 |
+
.gr_button {
|
64 |
+
background-color: #4CAF50; /* Green */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
border: none;
|
|
|
|
|
66 |
color: white;
|
67 |
+
padding: 15px 32px;
|
68 |
+
text-align: center;
|
69 |
+
text-decoration: none;
|
70 |
+
display: inline-block;
|
71 |
+
font-size: 16px;
|
72 |
+
margin: 4px 2px;
|
73 |
cursor: pointer;
|
|
|
74 |
}
|
75 |
|
76 |
"""
|
77 |
|
78 |
with gr.Blocks(css=custom_css) as demo:
|
79 |
gr.Markdown("## Zephyr Chatbot")
|
80 |
+
# load button from css
|
81 |
+
button = gr.Button("Click me", css_class="gr_button")
|
82 |
|
83 |
if __name__ == "__main__":
|
84 |
demo.launch()
|