Skip to content

This is my very First LLM Project. The project is mainly based on Streamlit , Gemini , LangChain. You can give a try using the link below. 🤠

Notifications You must be signed in to change notification settings

Fairooz14/Horcrux_GPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Horcrux GPT 🪄

A Student Assistant ChatGPT

This project is a Streamlit-based application that allows users to upload multiple PDF files and ask questions about their content. It also provides general AI responses for questions outside the context of the uploaded PDFs using Google's Generative AI.

Features

  • Upload multiple PDF files.
  • Extract text from the uploaded PDFs.
  • Break down the text into manageable chunks.
  • Store text chunks in a vector database using FAISS and Google Generative AI embeddings.
  • Ask questions about the content of the PDFs.
  • Provide general AI responses for questions outside the context of the PDFs.
  • Stream responses in real-time.

Getting Started

Prerequisites

  • Python 3.x
  • A Gemini AI API key

Installation

  1. Clone the repository:
    git clone https://github.com/Fairooz14/Horcrux_GPT.git
    cd Horcrux_GPT
  2. Create a virtual environment and activate it:
    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the required packages:
    pip install -r requirements.txt
  4. Add your own Google API key to the .env file:
    GOOGLE_API_KEY=your-google-api-key #from gemini studio
    

Running the Application

  1. Run the Streamlit application:
    streamlit run app.py
    

Project Structure

  • assist.py: The main application file that contains the Streamlit app logic.
  • htmlTemplates.py: Contains HTML templates for the Streamlit app.
  • .env: File to store environment variables ( such as API Key ).
  • raw_features: Folder where you can find files to understand the pdf features and general text separately.

Usage

  1. Responses general chat and answer any question before uploading any PDF.
  2. Now upload one or more PDF files using the sidebar.
  3. Click the "Process" button to extract and process the text from the PDFs.
  4. Ask a question in the text input box. If the question is related to the PDF content, the application will provide an answer based on the PDF context.

Technologies Used

  • Streamlit: Web framework for creating interactive web applications.
  • PyPDF2: Library for reading PDF files.
  • LangChain: Framework for building applications with large language models.
  • FAISS: Library for efficient similarity search and clustering of dense vectors.
  • Google Generative AI: API for generative AI models.

About

This is my very First LLM Project. The project is mainly based on Streamlit , Gemini , LangChain. You can give a try using the link below. 🤠

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages