Insight Application Codebase
This Streamlit web application is designed to help users perform document summarization and chat with CSV data using the Language Model GPT-3.5, developed by OpenAI. It allows users to upload a PDF document for summarization and chat with the content of a CSV file.
To run this application, you will need to install the necessary dependencies. We recommend using a virtual environment to manage your dependencies. Follow these steps:
-
Clone this repository to your local machine:
git clone https://github.com/your-repo-url.git -
Change into the project directory:
cd document-summarization-and-csv-chat -
Install the required dependencies using pip:
pip install -r requirements.txt -
Create a
.envfile and add your OpenAI API key as follows:OPENAI_API_KEY=your-api-key -
Run the Streamlit app:
streamlit run main.py
The application should now be accessible in your web browser.
- Upload a PDF file that you want to summarize.
- Enter your question or query in the provided input box.
- Click the "Summarize" button.
- The application will summarize the document based on your query and display the results.
- Upload a CSV file containing your data.
- Enter your query in the text area.
- Click the "Chat with CSV" button.
- The application will use GPT-3.5 to generate responses based on the data in the CSV file and your query.
- Document summarization using DistilBERT model.
- CSV data chat using GPT-3.5 (Language Model by OpenAI).
- Upload PDF and CSV files for processing.
- Interactive and user-friendly web interface.
- Seamless integration with the OpenAI API.
- Streamlit
- PyTorch
- Transformers
- NLTK
- PyPDF2
- Pandas
- Dotenv
You can install the required dependencies using the requirements.txt file.
The application requires an OpenAI API key, which should be placed in a .env file in the project directory. Create a .env file and add your API key as shown in the "Getting Started" section.
main.py: The main Streamlit application.readme.md: This documentation.requirements.txt: List of required Python packages..env.example: Example environment file (for OpenAI API key).data/: Directory for storing uploaded PDF and CSV files.
This application utilizes the power of OpenAI's GPT-3.5 and Hugging Face's DistilBERT for document summarization. Special thanks to the open-source community for their contributions to the libraries used in this project.