Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ clf = pipeline("text-classification", model=model, tokenizer=tokenizer)
|
|
13 |
|
14 |
# Define function for fake news detection
|
15 |
def classify_fake_news(text):
|
16 |
-
prediction = clf.predict(text)["score"]
|
17 |
# Convert prediction to label
|
18 |
label = "Fake" if prediction < 0.7 else "Real"
|
19 |
return label
|
|
|
13 |
|
14 |
# Define function for fake news detection
|
15 |
def classify_fake_news(text):
|
16 |
+
prediction = clf.predict(text)[0]["score"]
|
17 |
# Convert prediction to label
|
18 |
label = "Fake" if prediction < 0.7 else "Real"
|
19 |
return label
|