How chhssmch/nihao-chinese-ml works
NiHao is a Django-based Chinese-learning application with four ML workflows: text translation, Chinese speech transcription, image object recognition, and video object analysis. Users submit text or media through dedicated web views; those views call task-specific inference modules and render results in the corresponding interface. Text translation also has a documented FastAPI interface. The video analyzer reuses image detection’s cached YOLO model and Chinese label dictionary. Connections are limited to calls shown in excerpts or capabilities and entry points stated in the README; the overall Django URL mounting and unsampled internals are not expanded.
Main entry points: urls.py Django routes · ml_image/views.py Image upload view · ml_video/views.py Video upload view · ml_text/views.py Translation view
Components 17
Web interfaces
- Django routes
NiHao/urls.py - Translation view
ml_text/views.py - Transcription view
ml_audio/views.py - Image upload view
ml_image/views.py - Video upload view
ml_video/views.py - Translation page
ml_text/templates/ml_text/translate.html - Transcription page
ml_audio/templates/ml_audio/transcribe.html - Recognition page
ml_image/templates/ml_image/recognize.html - Analysis page
ml_video/templates/ml_video/analyze.html
Text translation
- Translation engine
ml_text/main.py - Translation API
ml_text/api_views.py
Speech recognition
- Whisper transcription
ml_audio/main.py
Visual learning
- YOLO detection
ml_image/main.py - Annotated image
ml_image/views.py - Video analyzer
ml_video/main.py - Video summary
ml_video/views.py
Other components
- Learner
Connections 17
- Learner → Django routes: requests pages
- Django routes → Translation view: routes request
- Django routes → Transcription view: routes request
- Django routes → Image upload view: routes request
- Django routes → Video upload view: routes request
- Translation view → Translation engine: translates text
ml_text/views.py - Translation API → Translation engine: translates text
ml_text/api_views.py - Transcription view → Whisper transcription: transcribes audio
ml_audio/views.py - Image upload view → YOLO detection: detects objects
ml_image/views.py - Image upload view → Annotated image: renders result
ml_image/views.py - Video upload view → Video analyzer: analyzes video
ml_video/views.py - Video analyzer → YOLO detection: reuses detector
ml_video/main.py - Video upload view → Video summary: renders summary
ml_video/views.py - Translation view → Translation page: renders page
ml_text/views.py - Transcription view → Transcription page: renders page
ml_audio/views.py - Image upload view → Recognition page: renders page
ml_image/views.py - Video upload view → Analysis page: renders page
ml_video/views.py