Skip to content

kckoh/langara-hackathon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Langchain & flask

1-click-deploy

This sample is an endpoint that tells programming jokes and shows how to deploy a flask app that uses Langchain on to AWS via Defang.

Prerequisites

  1. Download Defang CLI
  2. (Optional) If you are using Defang BYOC authenticated with your AWS account
  3. (Optional - for local development) Docker CLI

Deploying

  1. Open the terminal and type defang login
  2. Set the environment variable OPENAI_API_KEY by typing defang config set OPENAI_API_KEY.
  3. Type defang compose up in the CLI.
  4. Your app will be running within a few minutes.

Development

For development, first clone the project and navigate to its directory. After such, please run the command

docker compose up --build

This will start a Docker container with the flask app which will display the result of the langchain prompt.


Title: Flask & LangChain

Short Description: A sample project demonstrating how to deploy LangChain with Flask on Defang.

Tags: LangChain, Flask, AI, Python

Languages: python

langara-hackathon

git commands

  • git pull origin main
  • git checkout -b
  • edit or add
  • git status
  • git add
  • git commit
  • git push origin
  • make a PR

install python packages

  • pip install -r requirements.txt

run Flask

  • flask --app app/main.py run

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors