Create App.py
Browse files
App.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
from transformers import pipeline
|
| 3 |
+
|
| 4 |
+
model_name = "MuhammadAzharITU/fake-news-classifier"
|
| 5 |
+
pipe = pipeline("text-classification", model=model_name)
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
st.title("Fake News Classifier")
|
| 9 |
+
text = st.text_area("Enter Urdu news here")
|
| 10 |
+
|
| 11 |
+
if text:
|
| 12 |
+
# Perform classification
|
| 13 |
+
out = pipe(text)
|
| 14 |
+
st.json(out)
|