Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -153,11 +153,57 @@ LinkedIn:
|
|
| 153 |
|
| 154 |
me = Me()
|
| 155 |
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 161 |
|
| 162 |
if __name__ == "__main__":
|
| 163 |
ui.launch(server_name="0.0.0.0", server_port=int(os.environ.get("PORT", 7860)))
|
|
|
|
|
|
| 153 |
|
| 154 |
me = Me()
|
| 155 |
|
| 156 |
+
with gr.Blocks(css="""
|
| 157 |
+
body, .gradio-container {
|
| 158 |
+
background-color: #0d0d0d;
|
| 159 |
+
color: white;
|
| 160 |
+
}
|
| 161 |
+
.gr-button {
|
| 162 |
+
background-color: #ff4da6 !important;
|
| 163 |
+
color: black !important;
|
| 164 |
+
border-radius: 6px !important;
|
| 165 |
+
font-weight: 600 !important;
|
| 166 |
+
}
|
| 167 |
+
.gr-button:hover {
|
| 168 |
+
background-color: #ff1a8c !important;
|
| 169 |
+
}
|
| 170 |
+
.gr-chatbox, .gr-chat-interface {
|
| 171 |
+
background-color: #1a1a1a !important;
|
| 172 |
+
border: 1px solid #ff4da6 !important;
|
| 173 |
+
}
|
| 174 |
+
""") as ui:
|
| 175 |
+
|
| 176 |
+
gr.Markdown("### Quick Options", elem_id="title")
|
| 177 |
+
|
| 178 |
+
with gr.Row():
|
| 179 |
+
btn_contact = gr.Button("Contact Info")
|
| 180 |
+
btn_about = gr.Button("Who is Ayush?")
|
| 181 |
+
btn_projects = gr.Button("Latest Projects")
|
| 182 |
+
|
| 183 |
+
chat = gr.ChatInterface(
|
| 184 |
+
fn=me.chat,
|
| 185 |
+
title="Ayush Tyagi — Personal Assistant",
|
| 186 |
+
type="messages",
|
| 187 |
+
)
|
| 188 |
+
|
| 189 |
+
btn_contact.click(
|
| 190 |
+
lambda h: ("What is Ayush Tyagi's contact information?", h),
|
| 191 |
+
inputs=chat.chatbot,
|
| 192 |
+
outputs=chat.chatbot
|
| 193 |
+
)
|
| 194 |
+
|
| 195 |
+
btn_about.click(
|
| 196 |
+
lambda h: ("Who is Ayush Tyagi?", h),
|
| 197 |
+
inputs=chat.chatbot,
|
| 198 |
+
outputs=chat.chatbot
|
| 199 |
+
)
|
| 200 |
+
|
| 201 |
+
btn_projects.click(
|
| 202 |
+
lambda h: ("Show Ayush Tyagi’s latest projects.", h),
|
| 203 |
+
inputs=chat.chatbot,
|
| 204 |
+
outputs=chat.chatbot
|
| 205 |
+
)
|
| 206 |
|
| 207 |
if __name__ == "__main__":
|
| 208 |
ui.launch(server_name="0.0.0.0", server_port=int(os.environ.get("PORT", 7860)))
|
| 209 |
+
|