Skip to content

Riceyo/and-digital-openai-hackathon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Predict expenditure changes using OpenAI API using forecasted CPI.

backend

uses flask to stand-up endpoints that can take parameters and hit openai api with predefined prompts

required:

  • python
  • poetry

cd into backend folder

set local env var for openai key:

export openai_api_key=blah

install dependencies:

poetry install

run app:

poetry run flask run

endpoint to see the current cpi:

http://localhost:5000/api/cpi/value

endpoint to hit openai:

http://localhost:5000/api/cpi/process

values will be passed through from the frontend

run linter:

poetry run black .

frontend

uses vite to stand-up a react web ui that takes input from users, which are passed to the backend to hit openai with a prompt and display the response

required:

  • yarn

cd into frontend folder

install dependencies:

yarn install

run app:

run yarn dev

access web ui:

http://localhost:5173/

run linter:

yarn lint

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 82.9%
  • Python 12.1%
  • HTML 4.3%
  • CSS 0.7%