Spaces:
Running on Zero
Running on Zero
File size: 1,575 Bytes
e71990c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | ---
title: Simple Text Classifier
emoji: π°
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 6.24.0
app_file: app.py
pinned: false
license: mit
short_description: Classifies news into World, Sports, Business, or Sci/Tech.
---
# My first MLOps Project
[](https://github.com/evasim/my-first-MLOPS-project/actions/workflows/ci.yml)
π§ Currently just started to learn MLOps (how to build and deploy models) β following the [Made With ML](https://madewithml.com/) course.
π Using one of the public datasets on Hugging Face, [fancyzhx/ag_news](https://huggingface.co/datasets/fancyzhx/ag_news), to classify news headlines into World, Sports, Business, or Sci/Tech.
π **Live demo:** [huggingface.co/spaces/Evasim/Simple-Text-Classifier](https://huggingface.co/spaces/Evasim/Simple-Text-Classifier)
π€ **Trained model:** [huggingface.co/Evasim/First_Project](https://huggingface.co/Evasim/First_Project) (fine-tuned SciBERT)
## Reproducing locally
```bash
git clone https://github.com/evasim/my-first-MLOPS-project.git
cd my-first-MLOPS-project
pip install -r requirements.txt
# regenerate the dataset (not committed β it's public and regenerable)
python src/data_ingestion.py
# run the test suite
pytest src/
```
To run predictions against the trained model, add to a `.env` file:
```
HF_REPO_ID=Evasim/First_Project
```
Then: `python -m src.predict "your headline here"`
Training happens in [notebooks/MLOPS_project.ipynb](notebooks/MLOPS_project.ipynb).
|