NewsGPT

所属分类:GPT/ChatGPT
开发工具:Python
文件大小:0KB
下载次数:0
上传日期:2023-06-20 01:55:25
上 传 者sh-1993
说明:  使用新闻API查找新闻,并使用ChatGPT回答用户关于新闻的问题。
(Use News API to find news and use ChatGPT to answer user s question about the news.)

文件列表:
.idea/ (0, 2023-06-19)
.idea/NewsGPT.iml (326, 2023-06-19)
.idea/inspectionProfiles/ (0, 2023-06-19)
.idea/inspectionProfiles/profiles_settings.xml (174, 2023-06-19)
.idea/misc.xml (194, 2023-06-19)
.idea/modules.xml (266, 2023-06-19)
.idea/vcs.xml (180, 2023-06-19)
LICENSE (11357, 2023-06-19)
NER/ (0, 2023-06-19)
NER/Weibo_data/ (0, 2023-06-19)
NER/Weibo_data/label.txt (203, 2023-06-19)
NER/Weibo_data/vocab.txt (28292, 2023-06-19)
NER/Weibo_data/weiboNER_2nd_conll.test (108767, 2023-06-19)
NER/Weibo_data/weiboNER_2nd_conll.train (640741, 2023-06-19)
NER/__init__.py (0, 2023-06-19)
NER/__pycache__/ (0, 2023-06-19)
NER/__pycache__/__init__.cpython-38.pyc (149, 2023-06-19)
NER/__pycache__/config.cpython-38.pyc (705, 2023-06-19)
NER/__pycache__/model.cpython-38.pyc (1403, 2023-06-19)
NER/__pycache__/predict.cpython-38.pyc (939, 2023-06-19)
NER/__pycache__/utils.cpython-38.pyc (3639, 2023-06-19)
NER/config.py (483, 2023-06-19)
NER/data_process.py (1238, 2023-06-19)
NER/model.py (929, 2023-06-19)
NER/model/ (0, 2023-06-19)
NER/model/__pycache__/ (0, 2023-06-19)
NER/model/__pycache__/__init__.cpython-38.pyc (155, 2023-06-19)
NER/model/model_450.pth (7005413, 2023-06-19)
NER/model/model_7499.pth (11793253, 2023-06-19)
NER/predict.py (532, 2023-06-19)
NER/train.py (911, 2023-06-19)
NER/utils.py (2673, 2023-06-19)
__pycache__/ (0, 2023-06-19)
__pycache__/get_news.cpython-38.pyc (736, 2023-06-19)
__pycache__/news_gpt.cpython-38.pyc (1563, 2023-06-19)
get_news.py (581, 2023-06-19)
images/ (0, 2023-06-19)
images/compare.png (26380, 2023-06-19)
... ...

# NewsGPT We know that ChatGPT has the data being trained in 2021, so ChatGPT cannot get the point of the news after 2021. So, we use News API to get the data around now and feed to ChatGPT, then ChatGPT can make comments on news happened recently. ### Config Python: 3.8.13, pytorch: 1.12.1, pytorch-crf: 0.7.2 ### Run ~~~shell python3 main.py ~~~ Info: You should get an openai APIKEY, a news APIKEY, and Hanlp APIKEY(optional) first and fill them to the '***' part in the code. ### Example ![example](https://github.com/Ducker561/NewsGPT/blob/master/./images/example.png) #### Compare to the normal ChatGPT ![compare](https://github.com/Ducker561/NewsGPT/blob/master/./images/compare.png) #### Conclusion Because we use the recent news to 'train' ChatGPT, so ChatGPT knows better about recent news. ### Reference 1.[Named Entity Recognition for Chinese Social Media with Jointly Trained Embeddings](https://github.com/Ducker561/NewsGPT/blob/master/http://aclweb.org/anthology/D15-1064) 2.He H, Choi J D. The stem cell hypothesis: Dilemma behind multi-task learning with transformer encoders[J]. arXiv preprint arXiv:2109.06939, 2021. 3.[hankcs/HanLP](https://github.com/Ducker561/NewsGPT/blob/master/https://github.com/hankcs/HanLP/tree/doc-zh)

近期下载者

相关文件


收藏者