Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,11 +26,24 @@ def echo(message, history):
|
|
| 26 |
response = random.choice(choices)
|
| 27 |
return response
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
chatbot.launch(debug=True)
|
|
|
|
| 26 |
response = random.choice(choices)
|
| 27 |
return response
|
| 28 |
|
| 29 |
+
with gr.Blocks(css="""
|
| 30 |
+
#title { font-size: 28px; color: #00e676; text-align: center; }
|
| 31 |
+
.message.user { background-color: #1e88e5; color: white; border-radius: 12px; }
|
| 32 |
+
.message.bot { background-color: #424242; color: #eeeeee; border-radius: 12px; }
|
| 33 |
+
.chatbot { background-color: #121212; padding: 10px; border-radius: 16px; }
|
| 34 |
+
body { background-color: #111 !important; }
|
| 35 |
+
""") as demo:
|
| 36 |
+
|
| 37 |
+
gr.Markdown("# <div id='title'>🤖 AI Study Buddy</div>")
|
| 38 |
+
|
| 39 |
+
gr.ChatInterface(
|
| 40 |
+
respond,
|
| 41 |
+
type="messages",
|
| 42 |
+
description="Ask me anything about AI, ML, or Python!",
|
| 43 |
+
submit_btn="Send",
|
| 44 |
+
stop_btn="Stop",
|
| 45 |
+
chatbot=gr.Chatbot(show_label=False, elem_classes=["chatbot"])
|
| 46 |
+
)
|
| 47 |
+
|
| 48 |
+
demo.launch(debug=True)
|
| 49 |
chatbot.launch(debug=True)
|