jy46604790 commited on
Commit
fe8a691
1 Parent(s): 43ceee0

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +40 -0
README.md ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+
5
+
6
+
7
+ # Fake News Recognition
8
+
9
+ ## Overview
10
+
11
+ This model is trained by over 40,000 news from different medias based on the 'roberta-base'. you just need to put the text of the news which is less than 500 words(the excess will be truncated automatically).
12
+
13
+ LABEL_0: Fake news
14
+
15
+ LABEL_1: Real news
16
+
17
+ ## Qucik Tutorial
18
+
19
+ ### Download The Model
20
+
21
+ ```python
22
+ from transformers import pipeline
23
+ MODEL = "jy46604790/Fake-News-Bert-Detect"
24
+ clf = pipeline("text-classification", model=MODEL, tokenizer=MODEL)
25
+ ```
26
+
27
+ ### Feed Data
28
+
29
+ ```python
30
+ text = "Indonesian police have recaptured a U.S. citizen who escaped a week ago from an overcrowded prison on the holiday island of Bali, the jail s second breakout of foreign inmates this year. Cristian Beasley from California was rearrested on Sunday, Badung Police chief Yudith Satria Hananta said, without providing further details. Beasley was a suspect in crimes related to narcotics but had not been sentenced when he escaped from Kerobokan prison in Bali last week. The 32-year-old is believed to have cut through bars in the ceiling of his cell before scaling a perimeter wall of the prison in an area being refurbished. The Kerobokan prison, about 10 km (six miles) from the main tourist beaches in the Kuta area, often holds foreigners facing drug-related charges. Representatives of Beasley could not immediately be reached for comment. In June, an Australian, a Bulgarian, an Indian and a Malaysian tunneled to freedom about 12 meters (13 yards) under Kerobokan prison s walls. The Indian and the Bulgarian were caught soon after in neighboring East Timor, but Australian Shaun Edward Davidson and Malaysian Tee Kok King remain at large. Davidson has taunted authorities by saying he was enjoying life in various parts of the world, in purported posts on Facebook. Kerobokan has housed a number of well-known foreign drug convicts, including Australian Schappelle Corby, whose 12-1/2-year sentence for marijuana smuggling got huge media attention."
31
+ ```
32
+
33
+ ### Result
34
+
35
+ ```python
36
+ result = clf(text)
37
+ result
38
+ ```
39
+
40
+ output:[{'label': 'LABEL_1', 'score': 0.9994995594024658}]