Skip to content
/ py_llm Public

Sample Dockerized Python application that uses LangChain.

Notifications You must be signed in to change notification settings

miolab/py_llm

Repository files navigation

Py LLM

This repository contains a sample Dockerized Python application that uses LangChain and Streamlit together. The application encodes a given text into GPTed and displays it using Streamlit.

Note: This repository is intended for personal verification purposes and is not primarily intended for production development use. Preparation is required to use OpenAI's LangChain.

Sample Usage

Building and Running Locally

You can build the Docker image and launch the application using the following commands:

  • Prepare .env file

    cp .env.sample .env
    • Set OPENAI_API_KEY (required)
  • docker build and docker run

    docker build -t py_llm .
    docker run --rm -p 8501:8501 -e OPENAI_API_KEY=$(cat .env | grep OPENAI_API_KEY | cut -d '=' -f2) py_llm
  • After launch, access http://localhost:8501 in your browser to display the application's UI.

Application Features

Interactively talk with OpenAI sample bot, GPT Assistant, in UI.

  • Example usage image

    • User input

      image
    • Result

      image

Ref

About

Sample Dockerized Python application that uses LangChain.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published