sammy786 commited on
Commit
ba51239
·
verified ·
1 Parent(s): 6d9d677

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -6
app.py CHANGED
@@ -2229,8 +2229,16 @@ with gr.Blocks(
2229
 
2230
  # ==================== TAB 5: ASK AI ====================
2231
  with gr.Tab("💬 Ask AI"):
2232
- gr.Markdown("## Chat with RewardPilot AI")
2233
- gr.Markdown("*Ask questions about credit cards, rewards, and your spending*")
 
 
 
 
 
 
 
 
2234
 
2235
  chatbot = gr.Chatbot(height=400, label="AI Assistant")
2236
  with gr.Row():
@@ -2335,19 +2343,23 @@ with gr.Blocks(
2335
 
2336
  msg.submit(respond, [msg, chatbot, chat_user], [msg, chatbot])
2337
  send_btn.click(respond, [msg, chatbot, chat_user], [msg, chatbot])
2338
-
2339
  gr.Markdown("### 💡 Try asking:")
2340
  gr.Examples(
2341
  examples=[
2342
  ["Which card should I use at Costco?"],
2343
  ["How can I maximize my grocery rewards?"],
2344
  ["What's the best travel card for international trips?"],
2345
- ["Tell me about the Amex Gold card"],
2346
- ["Am I close to any spending caps?"],
 
 
 
2347
  ],
2348
  inputs=[msg]
2349
  )
2350
-
 
2351
  # ==================== TAB 6: RESOURCES (About + Agent Insight + API Docs) ====================
2352
  with gr.Tab("ℹ️ Resources"):
2353
  with gr.Tabs():
 
2229
 
2230
  # ==================== TAB 5: ASK AI ====================
2231
  with gr.Tab("💬 Ask AI"):
2232
+ gr.Markdown("## 🤖 Chat with RewardPilot AI (Powered by Gemini)")
2233
+
2234
+ # Add status indicator
2235
+ if config.USE_GEMINI and gemini.enabled:
2236
+ gr.Markdown("✅ **Status:** Gemini 2.0 Flash Active | **Mode:** Conversational Assistant")
2237
+ else:
2238
+ gr.Markdown("⚠️ **Status:** Fallback Mode (Gemini unavailable)")
2239
+
2240
+ gr.Markdown("---")
2241
+ gr.Markdown("*Ask questions about credit cards, rewards, and your spending patterns*")
2242
 
2243
  chatbot = gr.Chatbot(height=400, label="AI Assistant")
2244
  with gr.Row():
 
2343
 
2344
  msg.submit(respond, [msg, chatbot, chat_user], [msg, chatbot])
2345
  send_btn.click(respond, [msg, chatbot, chat_user], [msg, chatbot])
2346
+
2347
  gr.Markdown("### 💡 Try asking:")
2348
  gr.Examples(
2349
  examples=[
2350
  ["Which card should I use at Costco?"],
2351
  ["How can I maximize my grocery rewards?"],
2352
  ["What's the best travel card for international trips?"],
2353
+ ["Tell me about the Amex Gold card benefits"],
2354
+ ["Am I close to any spending caps this month?"],
2355
+ ["How do I improve my optimization score?"],
2356
+ ["Should I get a new credit card?"],
2357
+ ["Compare Amex Gold vs Chase Sapphire Reserve"],
2358
  ],
2359
  inputs=[msg]
2360
  )
2361
+
2362
+
2363
  # ==================== TAB 6: RESOURCES (About + Agent Insight + API Docs) ====================
2364
  with gr.Tab("ℹ️ Resources"):
2365
  with gr.Tabs():