Quickly finds latest research paper of user's chosen domain and generates summary according to user's current level of knowledge in real-time from publicly available research paper archives arXiv | Cornell University.
The arXiv API is used to search latest research paper in user's chosen domain. You can see that the LLM App enables AI-powered summary for current and latest research paper pdfs (i.e. unstructured documents) of various subjects like physics, biology, computer science, etc. and indexes input data in real-time just after files are found and stored on local storage.
There are 3 ways to run the app:
Run with Conda with a Linux VM or WSL (for windows users) or simply on linux/macOS terminal (for linux/macOS users)
-
Clone the repository on your system.
-
Create a .env file with following variables:
OPENAI_API_TOKEN={OPENAI_API_KEY}
HOST=0.0.0.0
PORT=8080
EMBEDDER_LOCATOR=text-embedding-ada-002
EMBEDDING_DIMENSION=1536
MODEL_LOCATOR=gpt-3.5-turbo
MAX_TOKENS=200
TEMPERATURE=0.0
RESEARCH_PAPER_FOLDER_PATH={REPLACE_WITH_RESEARCH_PAPER_RELATIVE_PATH}
-
From the project root folder, open your terminal and run
WSL
if you will be using it. -
Create a conda environment
-
Activate the conda environment
-
Install the app dependencies
Install the required packages:
pip install --upgrade -r requirements.txt
- Run the Pathway API
You start the application by running main.py
:
python main.py
- Run Streamlit UI
You can run the UI separately by running Streamlit app
streamlit run ui.py
command. It connects to the Pathway's backend API automatically and you will see the UI frontend is running on your browser.
- Create
.env
file in the root directory of the project, copy and paste the below config. Replace theOPENAI_API_TOKEN
configuration value with your key{OPENAI_API_KEY}
and replaceRESEARCH_PAPER_LOCAL_FOLDER_PATH
with a path where Research Paper folder is located{REPLACE_WITH_RESEARCH_PAPER_FOLDER_PATH}
. Other properties are optional to change and be default.
OPENAI_API_TOKEN={OPENAI_API_KEY}
HOST=0.0.0.0
PORT=8080
EMBEDDER_LOCATOR=text-embedding-ada-002
EMBEDDING_DIMENSION=1536
MODEL_LOCATOR=gpt-3.5-turbo
MAX_TOKENS=200
TEMPERATURE=0.0
RESEARCH_PAPER_FOLDER_PATH={REPLACE_WITH_RESEARCH_PAPER_RELATIVE_PATH}
-
From the project root folder, open your terminal and run
docker compose up
. -
Navigate to
localhost:8501
on your browser when docker installion is successful.
-
Make sure that Python 3.10 or above installed on your machine.
-
Download and Install Pip to manage project packages.
-
Create an OpenAI account and generate a new API Key: To access the OpenAI API, you will need to create an API Key. You can do this by logging into the OpenAI website and navigating to the API Key management page.
Then, follow the easy steps to install and get started using the app.
Next, navigate to the project folder:
cd Weekly-Research-Paper-Summariser
Create .env
file in the root directory of the project, copy and paste the below config, and replace the {OPENAI_API_KEY}
configuration value with your key.
OPENAI_API_TOKEN={OPENAI_API_KEY}
HOST=0.0.0.0
PORT=8080
EMBEDDER_LOCATOR=text-embedding-ada-002
EMBEDDING_DIMENSION=1536
MODEL_LOCATOR=gpt-3.5-turbo
MAX_TOKENS=200
TEMPERATURE=0.0
RESEARCH_PAPER_FOLDER_PATH={REPLACE_WITH_RESEARCH_PAPER_RELATIVE_PATH}
Replace RESEARCH_PAPER_FOLDER_PATH with your local Research Paper folder path and optionally, you customize other values.
Create a new virtual environment in the same folder and activate that environment:
python -m venv pw-env && source pw-env/bin/activate
Install the required packages:
pip install --upgrade -r requirements.txt
You start the application by running main.py
:
python main.py
You can run the UI separately by running Streamlit app
streamlit run ui.py
command. It connects to the Pathway's backend API automatically and you will see the UI frontend is running on your browser.