effectiveaccelerationism / text-to-banger

A simple API converting a user's proposed tweet into a veritable banger.
GNU General Public License v3.0
98 stars 13 forks source link

text-to-banger

Metatag Image

A simple API converting a user's proposed tweet into a veritable banger.

To run the app locally

Clone the repo

gh repo clone effectiveaccelerationism/text-to-banger

Install and run the app

cd webapp
npm install
npm start

The app will be running on http://localhost:3000

Run the OpenAI api server

Currently the app runs with an OpenAI API server, soon to be dismissed in favor of a custom finetuned model. To run the OpenAI API server, you need to have an OpenAI API key. You can get one here. Once you have your API key, create a file named .env in the apiserver directory and add the following line to it:

OPENAI_API_KEY=your-openai-key
OPENAI_MODEL_NAME=text-davinci-003

It's advisable to finetune a model by running the generate_finetuned_model.py script in the model directory.

Then, run the server with

cd api
python -m venv env
pip install -r requirements.txt
source env/bin/activate # on Windows use `env\Scripts\activate`
python server.py

NOTE: You must have both the webapp and the apiserver running in two separate terminal instances to use the app.

Model TODOs

API TODOs

WebApp TODOs