Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
import streamlit as st
|
2 |
-
from transformers import DistilBertTokenizer, DistilBertForSequenceClassification
|
3 |
import torch
|
4 |
|
5 |
-
# Load
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
9 |
|
10 |
# Function to predict if news is real or fake
|
11 |
def predict_news(news_text):
|
|
|
1 |
import streamlit as st
|
|
|
2 |
import torch
|
3 |
|
4 |
+
# Load model directly
|
5 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
6 |
+
|
7 |
+
tokenizer = AutoTokenizer.from_pretrained("sofzcc/distilbert-base-uncased-fake-news-checker")
|
8 |
+
model = AutoModelForSequenceClassification.from_pretrained("sofzcc/distilbert-base-uncased-fake-news-checker")
|
9 |
|
10 |
# Function to predict if news is real or fake
|
11 |
def predict_news(news_text):
|