dschandra commited on
Commit
10fcb42
·
verified ·
1 Parent(s): 600b0cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -25
app.py CHANGED
@@ -13,37 +13,31 @@ def chatbot(query):
13
  best_idx = int(scores.argmax()) # Fix: convert tensor to int
14
  return faq_df.iloc[best_idx]['answer']
15
 
16
- # Custom theme and layout using Gradio Blocks
17
- custom_theme = gr.themes.Base(
18
- primary_hue="blue",
19
- secondary_hue="gray",
20
- font=["Inter", "sans-serif"],
21
- radius_size=8,
22
- spacing_size=4
23
- )
24
-
25
- with gr.Blocks(theme=custom_theme, title="LIC Agent Assistant") as demo:
26
  gr.Markdown(
27
  """
28
- # 🧑‍💼 LIC Agent Assistant Chatbot
29
- Welcome! Ask any question related to LIC policies, claims, commissions, onboarding, or KYC.
30
- """
 
31
  )
32
 
33
  with gr.Row():
34
- user_input = gr.Textbox(
35
- lines=2,
36
- placeholder="Ask your LIC agent question here...",
37
- label="Your Question"
38
- )
39
- with gr.Row():
40
- output = gr.Textbox(
41
- label="Answer",
42
- placeholder="Bot response will appear here...",
43
- lines=5
44
- )
 
 
 
45
 
46
- submit_btn = gr.Button("Get Answer", variant="primary")
47
  submit_btn.click(fn=chatbot, inputs=user_input, outputs=output)
48
 
49
  demo.launch()
 
13
  best_idx = int(scores.argmax()) # Fix: convert tensor to int
14
  return faq_df.iloc[best_idx]['answer']
15
 
16
+ with gr.Blocks(title="LIC Agent Assistant") as demo:
 
 
 
 
 
 
 
 
 
17
  gr.Markdown(
18
  """
19
+ <h1 style='text-align: center; color: #1a237e;'>🧑‍💼 LIC Agent Assistant Chatbot</h1>
20
+ <p style='text-align: center;'>Ask questions about LIC policies, commissions, claims, onboarding, and more!</p>
21
+ """,
22
+ elem_id="header"
23
  )
24
 
25
  with gr.Row():
26
+ with gr.Column(scale=1):
27
+ user_input = gr.Textbox(
28
+ label="Your Question",
29
+ placeholder="E.g., How do I file a claim?",
30
+ lines=2
31
+ )
32
+ submit_btn = gr.Button("Get Answer", variant="primary")
33
+
34
+ with gr.Column(scale=1):
35
+ output = gr.Textbox(
36
+ label="Answer",
37
+ placeholder="Response will appear here...",
38
+ lines=6
39
+ )
40
 
 
41
  submit_btn.click(fn=chatbot, inputs=user_input, outputs=output)
42
 
43
  demo.launch()