Instructions to use MuhammadAzharITU/fake-news-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MuhammadAzharITU/fake-news-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="MuhammadAzharITU/fake-news-classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("MuhammadAzharITU/fake-news-classifier") model = AutoModelForSequenceClassification.from_pretrained("MuhammadAzharITU/fake-news-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download App.py from MuhammadAzharITU/fake-news-classifier: direct link, hf CLI and curl.
- Browser
- Download file 324 Bytes
-
https://huggingface.co/MuhammadAzharITU/fake-news-classifier/resolve/main/App.py
- Command line
-
hf download hf://MuhammadAzharITU/fake-news-classifier/App.py
-
curl -L -o App.py https://huggingface.co/MuhammadAzharITU/fake-news-classifier/resolve/main/App.py
324 Bytes
| import streamlit as st | |
| from transformers import pipeline | |
| model_name = "MuhammadAzharITU/fake-news-classifier" | |
| pipe = pipeline("text-classification", model=model_name) | |
| st.title("Fake News Classifier") | |
| text = st.text_area("Enter Urdu news here") | |
| if text: | |
| # Perform classification | |
| out = pipe(text) | |
| st.json(out) |