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
File size: 324 Bytes
a781ce9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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) |