The Reader App is a web application that allows users to fetch articles from a given URL, view the content, generate a PDF version of the article, and query the article using natural language processing techniques.
-
Clone this repository to your local machine.
-
Navigate to the project directory
cd Reader
. -
Create a .env file in the project directory and set your OpenAI API key as an environment variable:
OPENAI_API_KEY=YOUR_REAL_KEY
If you don't have an OpenAI API Key, #to platform.openai.com and generate one there.
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the app using the following command:
python app.py
-
Open your web browser and go to the URL provided by Streamlit (usually
http://localhost:8080
).
-
Enter the URL of the article you want to fetch in the provided input field.
-
Click the "Fetch Article" button to retrieve the article content.
-
The article's title, summary, and content will be displayed on the page.
-
You can download a PDF version of the article by clicking the "Download as PDF" button.
-
To query the article, enter your query in the provided input field and click the "Submit Query" button.
-
The app will process your query using natural language processing techniques and display the relevant information from the article.
If you'd like to contribute to the Reader App, feel free to submit a pull request or open an issue on the GitHub repository.
This app was developed as part of the Stanford Continuing Studies class TECH-16: LLMs for Business with Python taught by Charlie Flanagan. The app owes its thanks to him, Dima Timofeev, and many others including the teams who built the app's various dependencies.
This project is open-source and available under the Apache License 2.0.