Download app.py from AVAIYA/avaiya: direct link, hf CLI and curl.
- Browser
- Download file 1.46 kB
-
https://huggingface.co/spaces/AVAIYA/avaiya/resolve/main/app.py
- Command line
-
hf download hf://spaces/AVAIYA/avaiya/app.py
-
curl -L -o app.py https://huggingface.co/spaces/AVAIYA/avaiya/resolve/main/app.py
1.46 kB
| #pip install GoogleNews | |
| #pip install --upgrade GoogleNews | |
| 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 | |
| """) | |
| #df = pd.read_csv('News.csv') | |
| 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 }") | |
| # time.sleep(100) | |
| 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)") | |
| #st.markdown('test') |