Skip to content

HackForLive/hackathon_playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

1. Architecture

....

2. How To

2.1 Conda (Miniconda) Installation

Install conda from (https://docs.anaconda.com/miniconda/)

2.2 Activate Conda

Windows example:

cd C:\Users\<User>\miniconda3\condabin
.\conda.bat init powershell

Linux example:

Activate Conda (Linux eval "$(/home/<user>/miniforge3/bin/conda shell.bash hook)")

2.3 Create Conda Environment

This is one time action. To create environment named hackathon_venv:

conda env create --file .\environment.yaml -n hackathon_venv
conda activate hackathon_venv

Optional Commands:

(go base) conda activate
(delete) conda env remove --name hackathon_venv

2.4 Install Python Module named genai_hackthon

To install package, run

run.bat install

2.5 Initialize Vector Database

To initialize vector db, run

run.bat init_db

2.6 Build And Run

After each change project needs to be build! To build the project run:

run.bat build

Now you need to setup free azure account for month (we can of course create alternative way). In your azure account you need to provision Azure OpenAI service with some model deployment. After you create azure account and Azure OpenAI service, you need to create file name .env with following content:

AZURE_ENDPOINT=https://azure-openai-my-test.openai.azure.com/
AZURE_OPENAI_API_KEY=xxxxxxx
AZURE_DEPLOYMENT_NAME=gpt-35-turbo
AZURE_API_VERSION=2024-02-01

where azure endpoint is available in your Azure OpenAI service settings, azure openai api key is secret also available in you Azure OpenAI service, azure deployment name and azure api version should be also available (I will check). The config is ignored in .gitignore because it contains secrets so anyone could use it on your behalf!

You will see similar error if you do not create an environment file.

Example of missing env configuration file

Run streamlit UI

run.bat streamlit

Run all tests

run.bat test

Get help

run.bat build --help

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages