How zhaoyingjun/chatbot works
The repository contains two products: a Shopping Agent that turns order-page screenshots into analyzable, exportable data, and several Chinese Seq2Seq chatbot implementations across TensorFlow, distributed TensorFlow, and PyTorch. The chatbot workflow is corpus preparation, model training/checkpointing, then web-based inference. Shopping Agent backend-to-utility calls are visible in its API excerpt; its frontend/API connection and the chatbot variants’ broader workflows rely on README documentation where noted.
Main entry points: main.py Agent API · Seq2seqchatbot/execute.py Train and predict · Distribute_seq2seqchatbot/execute.py Distributed trainer · Seq2seqchatbot/execute.py Train and predict
Components 27
Shopping Agent
- Agent UI
chatagent/shopping-agent/app/frontend.py - Agent API
chatagent/shopping-agent/app/main.py - Browser control
chatagent/shopping-agent/app/web_utils.py - Order screenshots
chatagent/shopping-agent/app/web_utils.py - Order extraction
chatagent/shopping-agent/app/ocr_utils.py - Chat model
chatagent/shopping-agent/app/main.py - Excel export
chatagent/shopping-agent/app/excel_utils.py - Agent settings
chatagent/shopping-agent/app/config.py
TensorFlow Chatbot
- Corpus preparation
Chatbot-tensowflow2.0/Seq2seqchatbot/data_util.py - Train and predict
Chatbot-tensowflow2.0/Seq2seqchatbot/execute.py - Seq2Seq model
Chatbot-tensowflow2.0/Seq2seqchatbot/seq2seqModel.py - Model settings
Chatbot-tensowflow2.0/Seq2seqchatbot/config/getConfig.py - Chat web app
Chatbot-tensowflow2.0/Seq2seqchatbot/web/app.py
Distributed Chatbot
- Corpus preparation
Chatbot-tensowflow2.0/Distribute_seq2seqchatbot/data_util.py - Distributed trainer
Chatbot-tensowflow2.0/Distribute_seq2seqchatbot/execute.py - Distributed model
Chatbot-tensowflow2.0/Distribute_seq2seqchatbot/seq2seqModel.py - Model settings
Chatbot-tensowflow2.0/Distribute_seq2seqchatbot/config/getConfig.py - Chat web app
Chatbot-tensowflow2.0/Distribute_seq2seqchatbot/web/app.py - Corpus preparation
Chatbot_pytorch/Distribute_seq2seqchatbot/data_util.py - Distributed trainer
Chatbot_pytorch/Distribute_seq2seqchatbot/execute.py - Distributed model
Chatbot_pytorch/Distribute_seq2seqchatbot/seq2seqModel.py
PyTorch Chatbot
- Corpus preparation
Chatbot_pytorch/Seq2seqchatbot/data_util.py - Train and predict
Chatbot_pytorch/Seq2seqchatbot/execute.py - Attention model
Chatbot_pytorch/Seq2seqchatbot/seq2seqModel.py - Model settings
Chatbot_pytorch/Seq2seqchatbot/config/getConfig.py - Chat web app
Chatbot_pytorch/Seq2seqchatbot/web/app.py
Other components
- User
Connections 25
- User → Agent UI: instructs
README.md - Agent UI → Agent API: uses API
README.md - Agent API → Browser control: controls browser
chatagent/shopping-agent/app/main.py - Browser control → Order screenshots: captures
chatagent/shopping-agent/app/web_utils.py - Agent API → Order extraction: analyzes screenshots
chatagent/shopping-agent/app/main.py - Agent API → Excel export: saves and reads
chatagent/shopping-agent/app/main.py - Agent API → Chat model: requests replies
chatagent/shopping-agent/app/main.py - Agent API → Agent settings: uses settings
chatagent/shopping-agent/app/main.py - User → Chat web app: sends message
README.md - Chat web app → Train and predict: requests prediction
Chatbot-tensowflow2.0/Seq2seqchatbot/web/app.py - Corpus preparation → Train and predict: prepares corpus
README.md - Train and predict → Seq2Seq model: trains and predicts
- Train and predict → Model settings: loads settings
- User → Chat web app: sends message
README.md - Chat web app → Distributed trainer: requests prediction
Chatbot-tensowflow2.0/Distribute_seq2seqchatbot/web/app.py - Corpus preparation → Distributed trainer: prepares corpus
README.md - Distributed trainer → Distributed model: trains and predicts
- Distributed trainer → Model settings: loads settings
- User → Chat web app: sends message
README.md - Chat web app → Train and predict: requests prediction
Chatbot_pytorch/Seq2seqchatbot/web/app.py - Corpus preparation → Train and predict: prepares corpus
README.md - Train and predict → Attention model: trains and predicts
Chatbot_pytorch/Seq2seqchatbot/execute.py - Train and predict → Model settings: loads settings
Chatbot_pytorch/Seq2seqchatbot/execute.py - Corpus preparation → Distributed trainer: prepares corpus
README.md - Distributed trainer → Distributed model: trains and predicts