Coder Social home page Coder Social logo

streamlit_openai_ask_pdf's Introduction

Chat with your PDF

This Streamlit application allows you to upload a PDF document, and then ask questions to retrieve relevant information from the document.

Getting Started

Prerequisites

  • Python 3.7 or higher
  • Streamlit
  • Required Python libraries listed in requirements.txt

Installation

  1. Clone this repository to your local machine.
git clone https://github.com/franpandol/streamlit_openai_ask_pdf.git
  1. Navigate to the project directory.
cd your-repo
  1. Install the required Python libraries.
pip install -r requirements.txt

Configuration

Create a .env file in the project root directory to store your OpenAI API key. The contents of the file should be as follows:

OPENAI_API_KEY=your-api-key-here

Replace your-api-key-here with your actual OpenAI API key.

Usage

To run the application, use the following command in the project root directory:

streamlit run app.py

This will launch the Streamlit server and open the application in your web browser. You can then upload a PDF document using the file uploader, and ask questions related to the document content in the provided text input field.

Features

  • Upload a PDF document to process its content.
  • Ask questions to retrieve relevant information from the document.
  • Lazy loading of resources for better performance.
  • Error handling to ensure a smooth user experience.

Troubleshooting

If you encounter any issues while running the application, check the console for error messages. Ensure that your OpenAI API key is correct and that you have internet connectivity.

Contributing

Feel free to fork this repository, make changes, and open a pull request if you think your changes are worth sharing.

License

MIT License

streamlit_openai_ask_pdf's People

Contributors

franpandol avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.