How sandeeppaldotnet/fakenewsdetection-mlnet-aspnet works
FakeNewsTrainer is a two-part fake-news classification product: a console application trains and saves an ML.NET model, and an ASP.NET Core API loads that model to classify submitted articles. The main workflow runs from labeled CSV data through title-and-text combination and model training, then from an HTTP request through prediction to a response. Training and inference use separate model contracts. The source shows their respective artifact paths, but does not show deployment or artifact transfer between projects.
Main entry points: FakeNewsTrainer/Program.cs Training app · FakeNewsController.cs News endpoint · PredictionService.cs Prediction service · FakeNewsDetectionAPI/Program.cs API host
Components 11
Model training
- Training app
FakeNewsTrainer/FakeNewsTrainer/Program.cs - Labeled articles
FakeNewsTrainer/FakeNewsTrainer/fake_news_dataset.csv - Text preparation
FakeNewsTrainer/FakeNewsTrainer/Program.cs - ML.NET classifier
FakeNewsTrainer/FakeNewsTrainer/Program.cs - Trained model
FakeNewsTrainer/FakeNewsDetectionAPI/fakenews_model.zip
Prediction API
- API host
FakeNewsTrainer/FakeNewsDetectionAPI/Program.cs - News endpoint
FakeNewsTrainer/FakeNewsDetectionAPI/Controllers/FakeNewsController.cs - Prediction service
FakeNewsTrainer/FakeNewsDetectionAPI/Models/PredictionService.cs
Data contracts
- Training types
FakeNewsTrainer/FakeNewsTrainer/models.cs - API data types
FakeNewsTrainer/FakeNewsDetectionAPI/Models/models.cs
Other components
- API client
Connections 14
- Training app → Labeled articles: reads
- Training app → Training types: loads as
- Training app → Text preparation: combines text
- Text preparation → ML.NET classifier: provides training data
- Training app → ML.NET classifier: fits pipeline
- Training app → Trained model: saves model
- API host → Prediction service: registers
- API host → News endpoint: routes requests
- API client → News endpoint: posts article
- News endpoint → API data types: accepts data
- News endpoint → Prediction service: requests prediction
- Prediction service → Trained model: loads model
- Prediction service → API data types: returns prediction
- News endpoint → API client: returns result