Jiahuita
Attempt to resolve deployment issue
b2de734
|
raw
history blame
1.67 kB
---
title: News Source Classifier
emoji: 📰
colorFrom: blue
colorTo: red
sdk: fastapi
sdk_version: 0.95.2
app_file: app.py
pinned: false
language: en
license: mit
tags:
- text-classification
- news-classification
- LSTM
- tensorflow
pipeline_tag: text-classification
widget:
- example_title: "Crime News Headline"
text: "Wife of murdered Minnesota pastor hired 3 men to kill husband after affair: police"
- example_title: "Science News Headline"
text: "Scientists discover breakthrough in renewable energy research"
- example_title: "Political News Headline"
text: "Presidential candidates face off in heated debate over climate policies"
model-index:
- name: News Source Classifier
results:
- task:
type: text-classification
name: Text Classification
dataset:
name: Custom Dataset
type: Custom
metrics:
- name: Accuracy
type: accuracy
value: 0.82
---
# News Source Classifier
This model classifies news headlines as either Fox News or NBC News using an LSTM neural network.
## Model Description
- **Model Architecture**: LSTM Neural Network
- **Input**: News headlines (text)
- **Output**: Binary classification (Fox News vs NBC)
- **Training Data**: Large collection of headlines from both news sources
- **Performance**: Achieves approximately 82% accuracy on the test set
## Usage
You can use this model through the FastAPI endpoint:
```python
import requests
# Make a prediction
response = requests.post(
"https://huggingface.co/Jiahuita/NewsSourceClassification",
json={"text": "Your news headline here"}
)
print(response.json())