NewsGPT

所属分类:GPT/ChatGPT
开发工具:Python
文件大小:0KB
下载次数:0
上传日期:2023-10-21 03:53:40
上 传 者sh-1993
说明:  使用 ChatGPT检测假新闻,
(Fake news detection using chatGPT,)

文件列表:
.idea/ (0, 2023-10-20)
.idea/NewsGPT.iml (318, 2023-10-20)
.idea/inspectionProfiles/ (0, 2023-10-20)
.idea/inspectionProfiles/profiles_settings.xml (174, 2023-10-20)
.idea/misc.xml (186, 2023-10-20)
.idea/modules.xml (266, 2023-10-20)
.idea/vcs.xml (167, 2023-10-20)
data/ (0, 2023-10-20)
data/database_dump/ (0, 2023-10-20)
data/database_dump/news_gpt_2023-10-21.sql (27578758, 2023-10-20)
data/kaggle/ (0, 2023-10-20)
data/kaggle/Fake.csv (62789876, 2023-10-20)
data/kaggle/IFND.csv (11799684, 2023-10-20)
data/kaggle/True.csv (53582940, 2023-10-20)
data/kaggle/fake_augmented.csv (21469, 2023-10-20)
data/kaggle/newrecentTrue.csv (15191, 2023-10-20)
data/kaggle/newrecentTrue.txt (15184, 2023-10-20)
data/kaggle/true_augmented.csv (19273, 2023-10-20)
data/test_data/ (0, 2023-10-20)
data/test_data/gossipcop_fake.csv (12538704, 2023-10-20)
data/test_data/gossipcop_real.csv (19978126, 2023-10-20)
data/test_data/politifact_fake.csv (3286418, 2023-10-20)
data/test_data/politifact_real.csv (8278658, 2023-10-20)
data/trusted_source/ (0, 2023-10-20)
data/trusted_source/google_search_sources (330, 2023-10-20)
requirement.txt (52, 2023-10-20)
src/ (0, 2023-10-20)
src/agent/ (0, 2023-10-20)
src/agent/__init__.py (109, 2023-10-20)
src/agent/agent.py (742, 2023-10-20)
src/agent/context_agent.py (4133, 2023-10-20)
src/agent/stateless_agent.py (473, 2023-10-20)
src/base_gpt.py (3980, 2023-10-20)
src/context/ (0, 2023-10-20)
src/context/__init__.py (29, 2023-10-20)
src/context/context.py (1221, 2023-10-20)
src/database/ (0, 2023-10-20)
... ...

# NewGPT This repository includes the implemenation of a news detection system leverage LLM and web searches from trusted sources. ## Running Experiments The following section contains the steps needed to run the experiments. This may vary on different IDEs or operating systems. Pleaase contact us through email if any issues are encountered. Install Packages ```bash pip install -r requirements.txt ``` Note: you may need to install additional packages required from these libraries. Set up Database 1. Download mySQL database management system. 2. Create a new table named "**news_gpt**" 3. Import SQL database dump at **data->database_dump->news-gpt-2023-10-21.sql** Set up API keys 1. Get openai API keys at https://openai.com/product 2. Get Bing Search API keys at https://www.microsoft.com/en-us/bing/apis/bing-web-search-api This step also involves setting up Azure Virtual Machine for the API acess. Set up Environment Variables in .env file ``` DB_PASSWORD= OPENAI_API_KEY= BING_KEY= ``` To run experiments: 1. One Search NewsGPT Run **src->t.py**, results will be inserted into the SQL database. 2. Multi-search NewsGPT Run comment out line 72-73 in **src->searcher->bing_searcher**, then run **src->t.py**, results will be inserted into the SQL database. 3. Base GPT model Run **src->base_gpt.py**, results will be inserted into the SQL database. To run the models on different dataset, please adjust the SQL query to select from differnt data tables accordingly at line 24 in **src->t.py** or line 21 in **src->base_gpt.py**.

近期下载者

相关文件


收藏者