maahikachitagi commited on
Commit
0112402
·
verified ·
1 Parent(s): 0ab5946

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -7
app.py CHANGED
@@ -26,11 +26,24 @@ def echo(message, history):
26
  response = random.choice(choices)
27
  return response
28
 
29
- chatbot = gr.ChatInterface(respond, type = "messages",
30
- title="🤖 AI Study Buddy",
31
- description="Ask me anything about AI, ML, or Python!",
32
- theme="dark",
33
- chatbot=gr.Chatbot(show_label=False),
34
- submit_btn="Send",
35
- stop_btn="Stop")
 
 
 
 
 
 
 
 
 
 
 
 
 
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)