Skip to content

chalabi2/ai-app-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ai-app-template

A template for building AI apps. Flask & Gunicorn backend with a Nextjs frontend.

Getting Started

Clone the repository

git clone https://github.com/chalabi2/ai-app-template.git

Frontend

Nextjs app with shadcn/ui, queries the backend for image processing.

Dependencies

  • Node.js
  • npm

Development

cd frontend
npm install
cp .env.example .env
npm run dev

Deployment

The frontend is deployed to vercel. Be sure to add the environment variables to the vercel project and double check your auth sources redirects are set correctly.

Backend

Flask app with a pipeline from Huggingface.

Dependencies

  • Python
  • pip

Development

cd backend
python -m venv venv
venv\Scripts\activate ## or on mac source venv/bin/activate
pip install -r requirements.txt
flask run

Deployment

We containerize the python server with docker and use cloudflare to reverse proxy the Akash deployment to our domain. Within the backend directory you will find a deploy.yml file for deploying the container to akash. Be sure to change the image to your own docker hub account. The dockerfile and various other deployment related files can be found in the backend as well.