|
|
|
|
|
|
|
import streamlit as st |
|
from GoogleNews import GoogleNews |
|
from sklearn.feature_extraction.text import TfidfVectorizer |
|
from sklearn.metrics.pairwise import cosine_similarity |
|
import pandas as pd |
|
import numpy as np |
|
import string |
|
import re |
|
from nltk.corpus import stopwords |
|
from sklearn.metrics.pairwise import cosine_similarity |
|
import sklearn |
|
import time |
|
|
|
|
|
googlenews = GoogleNews() |
|
googlenews = GoogleNews(lang='ar') |
|
googlenews.clear() |
|
|
|
|
|
|
|
st.write(""" |
|
Arabic Fake News Detection System |
|
A system designed as a part of master project |
|
done by Reem AlFouzan |
|
Supervised by : Dr, Abdulla al mutairi |
|
""") |
|
|
|
text_input = st.text_input (''' **Enter the text** ''') |
|
if len(text_input) != 0: |
|
inputt = [] |
|
inputt = pd.DataFrame([text_input]) |
|
|
|
googlenews.search(inputt.iloc[0,0]) |
|
googlenews.get_news(inputt.iloc[0,0]) |
|
|
|
result_0 = googlenews.page_at(1) |
|
totalCount = len(result_0) |
|
st.markdown(f"Total Data is: {totalCount} ") |
|
|
|
st.markdown(f"my input is : { result_0 }") |
|
|
|
|
|
|
|
|
|
st.sidebar.markdown('مواقع اخباريه معتمده ') |
|
st.sidebar.markdown("[العربية](https://www.alarabiya.net/)") |
|
st.sidebar.markdown("[الجزيرة نت](https://www.aljazeera.net/news/)") |
|
st.sidebar.markdown("[وكالة الانباء الكويتية](https://www.kuna.net.kw/Default.aspx?language=ar)") |
|
|
|
|