PaperSumGPT
PaperSumGPT is a tool for abbreviating long scientific paper contents using ChatGPT, designed to help researchers and students to quickly understand the key points of academic papers.
한국 분들은 여기에 있는 문서를 읽어주세요!
Table of Contents
- CAUTION 1: For ChatGPT free users!
- CAUTION 2: PDF converting functionality deprecated
- How to Install
- Usage
- Dependencies
- License
CAUTION 1: For ChatGPT free users!
::2023-04-03 updated::
After I tested with several accounts with ChatGPT, I found that there were significant differences in the performance of ChatGPT depending whether the account is a free user or a paid user (ChatGPT Plus).
If you are a free user of ChatGPT, and you have a long paper to summarize, I recommend you to upgrade your account to ChatGPT Plus to get a better performance.
Unfortunately, the free version of ChatGPT cannot understand and store the long context of the input text, which leads to a poor performance; it will export a summary that is NOT related to the input text at all, or it will export an output related to the certain part of the input text.
CAUTION 2: PDF converting functionality deprecated
Since the PDF converting functionality can be led to a poor results from ChatGPT, I have decided to deprecate the PDF converting functionality. Sorry for your inconvenience... 🙏🏻
How to Install
If you are using Mac, you can skip (0) For Windows users step.
(0) For Windows users (first time only!)
Since there are no pre-built binaries for Windows, follow the instructions below to install PaperSumGPT on Windows.
In the search tab, type
Turn Windows features On (Windows 기능 켜기/끄기 in Korean)
. Then, check the box ofWindows Subsystem for Linux
.Next, reboot your computer.
Now, you need to install Ubuntu in your local computer.
Open Ubuntu and make your UNIX accounts and passwords.
For ease of use, you should install
Anaconda
by following instructions.wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh
bash Anaconda3-2019.10-Linux-x86_64.sh
Read all the instructions with Enter and type
yes
to agree with the license.source ~/.bashrc
Now, type
conda activate
in your terminal. If you see
(base)
in your terminal, you have successfully installed Anaconda.Install VcXsrv in your local computer. Download
VcXsrv
installer and run it.
Then, clickFinish
.Next, open
XLaunch
and clickNext
.After you open
XLaunch
, you should check the following options:
- Multiple windows
- Start no client
- Disable access control
Done! Now let's move on to the terminal.
Type the below commands in your terminal.
sudo systemd-machine-id-setup
sudo dbus-uuidgen --ensure
cat /etc/machine-id
If terminal shows a long string of numbers and letters, you have successfully installed
systemd-machine-id-setup
anddbus-uuidgen
.Finally, you can install
x11-apps
by typing the following command:sudo apt-get install x11-apps xfonts-base xfonts-100dpi xfonts-75dpi xfonts-cyrillic
Add the environment variable
DISPLAY
to your.bashrc
file by typing the following command:echo "export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0 sudo /etc/init.d/dbus start &> /dev/null" >> ~/.bashrc
source ~/.bashrc
Test your X11 GUI by typing the following command:
xeyes
If you see a pair of eyes, you have successfully installed X11 GUI.
These steps are essential (in Windows) for successfully executing
playwright
in Windows terminal (which is critical when you configure yourChatGPT
account).
(1) Clone this repository
You can install PaperSumGPT by cloning this repository and install it from the source:
git clone https://github.com/wjgoarxiv/papersumgpt.git
cd papersumgpt/
(2) Install dependencies
And you must use install_old-repo.sh
to install the legacy version of chatgpt_wrapper
. The new version of chatgpt_wrapper
is not compatible with the current version of papersumgpt
(since the new version of chatgpt_wrapper
will use the ChatGPT API, not the stream-based one).
chmod +x *
./install_old-repo.sh
(3) Install PaperSumGPT
Then, you can install PaperSumGPT by running the following command:
pip install .
Usage
(1) Run chatgpt_wrapper
before using papersumgpt
Before using papersumgpt
, you must run chatgpt_wrapper
to start the ChatGPT server.
Since you are first running chatgpt_wrapper
in your computer, you might input the following command to install playwright
:
playwright install
The nightly will be downloaded and installed in your local machine.
Next, you can use the following command to start the server:
chatgpt install
Login to your ChatGPT account in Nightly browser. If you see the chat window, close the browser and type /exit
to close the chatgpt_wrapper
. After that, you can restart the chatgpt_wrapper
by running the following command:
chatgpt
This is the original functionality of chatgpt_wrapper
. For more information, please visit the chatgpt_wrapper github repository.
(2) Run papersumgpt
to summarize the content of a paper
After running chatgpt_wrapper
, you can use papersumgpt
to summarize the content of a paper. You can use the following command to summarize the content of a paper:
papersumgpt
The following error might occur:
------------------------------------------------
ERROR: There is no file in the current directory. Please check the current directory.
------------------------------------------------
Note that you must put the paper you want to summarize in the current working directory. For a demonstration, we will use chatgpt-a+meta+analysis+after+2.5+months.txt
as an example. Refer to the ExampleRun/
folder. A chatgpt-a+meta+analysis+after+2.5+months.txt
file was prepared by just copying the text contents of chatgpt-a+meta+analysis+after+2.5+months.pdf
and pasting it into a text file.
Copy that file to the current working directory and run papersumgpt
again:
papersumgpt
And then, papersumgpt will ask you to choose between Markdown or PDF as the output format.
INFO: Please type the number the file type that you want to use:
1. Markdown (`.md`) file
2. Plain text (`.txt`) file
:
Since we have chatgpt-a+meta+analysis+after+2.5+months.txt
in the ExampleRun/
folder, we will choose option 2. The papersumgpt will show the list of text files in the current directory and ask you to choose the file you want to summarize.
------------------------------------------------
+---------------+------------------------------------------------+
| File number | File name |
|---------------+------------------------------------------------|
| 1 | ./chatgpt-a+meta+analysis+after+2.5+months.txt |
+---------------+------------------------------------------------+
------------------------------------------------
INFO: Please select the file number or press "0" to exit:
Then, we will choose option 1.
INFO: The file name that would be utilized is ./chatgpt-a+meta+analysis+after+2.5+months.txt
------------------------------------------------
INFO: Do you want to turn on `verbose` mode? If you turn on `verbose` mode, the program will print the intermediate results. (y/n):
Now, we have to choose whether to turn on the verbose
mode. If you turn on the verbose
mode, the program will print all the intermediate results. If you turn off the verbose
mode, the program will only print the final result. In this case, we will turn off the verbose
mode by pressing n
.
------------------------------------------------
INFO: Please type the number the ChatGPT model that you want to use:
1. default (Turbo version for ChatGPT Plus users and default version for free users)
2. gpt4 (Only available for ChatGPT Plus users; a little bit slower than the default model)
3. legacy (Only available for ChatGPT Plus users; an older version of the default model)
Note that the option 2 and 3 are NOT available for free users. If you are the free user, please select the option 1.
Finally, we will choose the ChatGPT model that we want to use. In this case, we will choose the default model. Press 1
to choose the default model.
INFO: Tossing initial prompt...
INFO: ChatGPT started abbreviating the input contents...
INFO: Waiting for ChatGPT to respond for 1/11 part(s)...
INFO: 1/11 part(s) tossed to ChatGPT.
INFO: Waiting for ChatGPT to respond for 2/11 part(s)...
INFO: 2/11 part(s) tossed to ChatGPT.
INFO: Waiting for ChatGPT to respond for 3/11 part(s)...
INFO: 3/11 part(s) tossed to ChatGPT.
INFO: Waiting for ChatGPT to respond for 4/11 part(s)...
...
The tool will process the content summary of the paper and make an output file in the same directory as the input file. Let's wait for a while! ☕️
While we are waiting, I have to mention that all these steps are synchronized with your current ChatGPT session in ChatGPT website. You can visit the website later to see all the progresses of the content summary.
After the abbreviation process is finished, the program will show the following message:
INFO Choose output format (stream / txt / md):
You can choose the output format by typing stream
, txt
, or md
. In this case, we will choose md
to output the result as a markdown file.
INFO: Output saved to ./chatgpt-a+meta+analysis+after+2.5+months.txt.md
You can find chatgpt-a+meta+analysis+after+2.5+months.txt.md
in the ExampleRun/
folder.
Open the markdown file with markdown-compatible editors. You can see the awesome result! 🎉 (Click here to see the output markdown file)
Note that ChatGPT sometimes makes undesired outputs. In this case, you should try a few times to get the best result. Good luck with your research! 🚀
Dependencies
- pyfiglet - For generating ASCII art of the project name.
- tabulate - For creating clean and readable tables for the output.
- chatgpt_wrapper - An useful open-source unofficial Power CLI, Python API and Flask API that lets us interact programmatically with ChatGPT/GPT4.
License
This project is licensed under the MIT License.
For more information, bug reports, or feature requests, please visit the GitHub repository.