How danhvo100906/24ct2_vo_thanh_danh works
StudyBot is a Flask web app with user registration/login, role-gated admin pages, an intent-based chatbot, and per-user chat history. The main workflow is a signed-in user submitting a message through the chat API; the route obtains a response from the model and stores the exchange before returning it. The framework also includes a separate training script. The README is empty, so capabilities and links here rely on the supplied source excerpts and index; the retrieval module’s behavior is not shown.
Main entry points: routes.py Web routes · chatbot.py Response inference · train.py Training script · __init__.py App setup
Components 16
Web application
- App entry
app/main.py - App setup
app/__init__.py - Authentication
app/auth.py - Web routes
app/routes.py - Page templates
app/templates
Accounts and persistence
- User and history models
app/models.py - Application database
app/models.py
Chatbot runtime
- Response inference
framework/src/model/chatbot.py - Neural network
framework/src/model/neural_net.py - Text processing
framework/src/model/nltk_utils.py - Intent definitions
framework/src/data/intents.json - Trained model weights
framework/src/model/data.pth - Retrieval module
framework/src/processing/retrieval.py
Model training
- Training script
framework/src/model/train.py
Other components
- User
- Admin
Connections 21
- User → Authentication: registers or logs in
app/auth.py - Authentication → User and history models: queries and saves
app/auth.py - User → Web routes: requests pages and chat
app/routes.py - Admin → Web routes: requests admin pages
app/routes.py - App entry → App setup: creates app
app/main.py - App setup → User and history models: initializes database
app/__init__.py - App setup → Web routes: registers routes
app/__init__.py - App setup → Authentication: registers routes
app/__init__.py - Web routes → Page templates: renders pages
app/routes.py - Authentication → Page templates: renders pages
app/auth.py - Web routes → User and history models: queries and stores chats
app/routes.py - User and history models → Application database: maps records
app/models.py - Web routes → Response inference: requests response
app/routes.py - Response inference → Neural network: runs inference
framework/src/model/chatbot.py - Response inference → Text processing: tokenizes and encodes
framework/src/model/chatbot.py - Response inference → Intent definitions: loads intent responses
framework/src/model/chatbot.py - Response inference → Trained model weights: loads model state
framework/src/model/chatbot.py - Training script → Intent definitions: loads training examples
framework/src/model/train.py - Training script → Text processing: processes training text
framework/src/model/train.py - Training script → Neural network: trains network
framework/src/model/train.py - Training script → Trained model weights: saves trained state
framework/src/model/train.py