From 6985d758f7b9b33515dbffc0190e923157f4245e Mon Sep 17 00:00:00 2001 From: Marc Puig Date: Sun, 9 Jul 2023 16:34:21 +0200 Subject: [PATCH] Update README.md with instructions to run it locally --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index cbfeaea..c1eca8d 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,29 @@ possible to run semantic searches through it. Given a query, RentaGPT fetches relevant information from the database, and then it prompts OpenAI GPT-3 API to generate an answer from the more relevant documents found in the initial step. +## How to run it locally + +First build the `index.html` from the `frontend` directory + +```bash +cd frontend +npm install && npm run build +cp dist/index.html ../src/templates +``` + +Move to the project root, create a copy of the env file + +```bash +cd .. +cp .env.template .env +``` + +Fill in the `.env` file with your credentials and run the project + +```bash +uvicorn src.main:app --env-file .env +``` + ## How to deploy to fly.io Create an account to [fly.io](https://fly.io)