GithubHelp home page GithubHelp logo

mishra-tapas / llm-pdf-chat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aahnik/llm-pdf-chat

0.0 0.0 0.0 262 KB

Chat with LLMs using PDFs as context! Experimental exploration: FastAPI + Streamlit + Langchain

Python 100.00%

llm-pdf-chat's Introduction

llm-pdf-chat

FastAPI + Streamlit + Langchain!

Running Locally

Make sure to have poetry package manger installed locally.

Configure the .env file as per the .env.template

  • Install all the dependancies locally:

    poetry install
    poetry shell # activate the virtual environment
  • To start the FastAPI backend server:

    # first make sure you have a mongo db server up and running
    # and that you have set the connection string in your .env file
    cd server
    uvicorn main:app --reload
    # --reload if you are developing and changing the source files

    This would start running the API on your localhost:8000 and you can access the Swagger Docs at /docs endpoint.

  • To start the streamlit web-interface:

    cd client
    streamlit run app.py

    This would start the streamlit app at localhost:8501.

Files Directory

Note: Files are shared between the streamlit and FastAPI code.

  • It is expected that both the processes are running on the same machine.
  • The environment variable, FILES_STORAGE_DIR is used by both the streamlit and FastAPI code.
  • The files uploaded from the streamlit interface are stored in this directory, and are accessed by langchain running in the server code of FastAPI.
  • Either write an absolute path, or the path must be wrt the parent of the client or server dirs. like ../uploaded_files/

llm-pdf-chat's People

Contributors

aahnik 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.