How lengocvu234/mango-ai-app works
Xoài AI is a Streamlit mango-detection application. Users authenticate, choose image upload or live camera, receive model detections, and can review saved results; upload results can also be emailed. Separate branches provide account settings and an AI chat assistant, while feature panels expose history and additional tools. The graph follows the visible app routing and sampled calls; some implementation details are omitted because excerpts are partial, and unsampled modules are represented only where the source index or visible wiring supports them.
Main entry points: app.py Streamlit app · database.py User and history data · ui_pages.py Upload and camera pages · detection_service.py Mango detection
Components 15
Application flow
- Streamlit app
DuAnXoai/app.py - App configuration
DuAnXoai/app_config.py - Upload and camera pages
DuAnXoai/ui_pages.py - Shared UI components
DuAnXoai/ui_components.py
Mango vision
- Mango detection
DuAnXoai/detection_service.py - YOLO model
DuAnXoai/best.pt - Feature and history panels
DuAnXoai/feature_panels.py
Accounts and history
- Login and signup
DuAnXoai/auth.py - Account settings
DuAnXoai/user_settings.py - User and history data
DuAnXoai/database.py
Additional features
- Result email delivery
DuAnXoai/email_service.py - Floating chat
DuAnXoai/chatbot.py
Other components
- User
- Gmail SMTP
- Groq AI service
Connections 20
- User → Streamlit app: uses
DuAnXoai/app.py - Streamlit app → App configuration: loads settings
DuAnXoai/app.py - Streamlit app → Login and signup: routes login
DuAnXoai/app.py - Streamlit app → Upload and camera pages: routes pages
DuAnXoai/app.py - Streamlit app → Feature and history panels: renders panels
DuAnXoai/app.py - Streamlit app → Floating chat: renders chat
DuAnXoai/app.py - Streamlit app → YOLO model: loads model
DuAnXoai/app.py - Streamlit app → Mango detection: passes detector
DuAnXoai/app.py - Upload and camera pages → Mango detection: runs detection
DuAnXoai/app.py - Mango detection → User and history data: saves history
DuAnXoai/detection_service.py - Upload and camera pages → Result email delivery: sends result
DuAnXoai/ui_pages.py - Result email delivery → Gmail SMTP: delivers email
DuAnXoai/email_service.py - Floating chat → Groq AI service: requests advice
- Login and signup → User and history data: checks accounts
DuAnXoai/auth.py - Login and signup → Account settings: uses settings
DuAnXoai/auth.py - Account settings → User and history data: updates account
DuAnXoai/user_settings.py - Upload and camera pages → User and history data: reads profile
DuAnXoai/ui_pages.py - Feature and history panels → User and history data: reads history
DuAnXoai/feature_panels.py - Feature and history panels → Mango detection: uses detection
DuAnXoai/feature_panels.py - Shared UI components → Account settings: opens settings
DuAnXoai/ui_components.py