Ahmad140 commited on
Commit
4c388c1
·
verified ·
1 Parent(s): a4e90f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -339,11 +339,11 @@ def get_response_and_data(user_message, intent):
339
  elif intent == "portfolio":
340
  reply = "- 📷 Instagram: @elitevisuals\n- 🖥️ Gallery: www.elitevisuals.com/work"
341
  elif intent == "greeting":
342
- reply = "- Wa-Alaikum-Assalam! 👋\n- I help with websites, e-commerce, SEO, chatbots.\n- **To start a project, say 'I want to build a website'**\n- Ask about packages or extra features."
343
  elif intent == "irrelevant":
344
  reply = "- ❌ Out of scope. I only answer web & digital services."
345
  else:
346
- reply = "- How can I help? Services: website design, e-commerce, SEO, chatbots, maintenance.\n- **To start a project, say 'I want to build a website'**"
347
 
348
  return reply, data
349
 
@@ -401,7 +401,8 @@ Created: {project.get('created_at', 'N/A')}
401
  return ai_reply, data
402
  return get_response_and_data(user_message, intent)
403
 
404
- # ---------- Admin API Routes ----------
 
405
  @app.route('/api/projects', methods=['GET'])
406
  def get_projects():
407
  projects = get_all_projects()
@@ -455,10 +456,6 @@ def save_message(session_id, role, content, intent=None):
455
  def index():
456
  return send_from_directory('.', 'index.html')
457
 
458
- @app.route('/admin')
459
- def admin():
460
- return send_from_directory('.', 'admin.html')
461
-
462
  if __name__ == '__main__':
463
  port = int(os.environ.get('PORT', 7860))
464
  app.run(host='0.0.0.0', port=port)
 
339
  elif intent == "portfolio":
340
  reply = "- 📷 Instagram: @elitevisuals\n- 🖥️ Gallery: www.elitevisuals.com/work"
341
  elif intent == "greeting":
342
+ reply = "- Wa-Alaikum-Assalam! 👋\n- I help with websites, e-commerce, SEO, chatbots.\n- **To start a new project, say 'I want to build a website'**\n- Ask about packages or extra features."
343
  elif intent == "irrelevant":
344
  reply = "- ❌ Out of scope. I only answer web & digital services."
345
  else:
346
+ reply = "- How can I help? Services: website design, e-commerce, SEO, chatbots, maintenance.\n- **To start a new project, say 'I want to build a website'**"
347
 
348
  return reply, data
349
 
 
401
  return ai_reply, data
402
  return get_response_and_data(user_message, intent)
403
 
404
+ # ---------- Admin API Routes (for local admin panel) ----------
405
+ # Note: Admin route removed from public – only backend APIs for data access
406
  @app.route('/api/projects', methods=['GET'])
407
  def get_projects():
408
  projects = get_all_projects()
 
456
  def index():
457
  return send_from_directory('.', 'index.html')
458
 
 
 
 
 
459
  if __name__ == '__main__':
460
  port = int(os.environ.get('PORT', 7860))
461
  app.run(host='0.0.0.0', port=port)