will-clarke/story-gen

AI experiments coated in a Flask app

0

stars

82

commits

Python

primary language

Dec 8, 2023

updated

README

ShortStories.lol

This is basically an experiment to encourage me to learn how ML / AI actually works. I generated these pretty rubbish models on my laptop(!) with 7b- & 13b-parameter Llama2 models.

This repo is roughly split in two main bits:

  1. A way to generate & rate short stories
  2. A web app (Python / Flask) to display the stories

Interesting files include:

Made with the following:

  • Flask
  • Sqlalchemy
  • HuggingFace
  • Langchain

Hosting

Hosted on a digital ocean droplet (which is really nice)

TODOs:

  • [-] IN PROGRESS - learn more about models (& fine-tune!)
    • Fine-tune model to determine whether text is actually a story or not (eg. huggingface fine-trained model)
    • Fine-tune model to determine whether story is good [Update: trained model (on reddit data) is useless. Need better data / better fine-tuning]
  • improve prometheus metrics!
  • allow human votes
  • use own model?!
  • log in / bot detection?
  • Grafana???
  • think of awesome monetisation ideas
  • SSL (surprisingly easy with certbot)
  • prometheus metrics or something
  • scrape reddit short stories / two sentence horror
  • tags
  • analytics!
  • sort by AI votes
  • get migrations working properly
  • make the website look half decent
  • stories page
  • stories page with lots of search-param filters. eg. tones, themes, votes

Dev tips

flask db check
flask db migrate -m 'message'
flask db upgrade
flask db history

Migrations

alembic revision --autogenerate -m "init; create stories tables"
alembic upgrade head

Contributors

will-clarke

82 commits

will-clarke/story-gen

AI experiments coated in a Flask app

0

stars

82

commits

Python

primary language

Dec 8, 2023

updated

README

ShortStories.lol

This is basically an experiment to encourage me to learn how ML / AI actually works. I generated these pretty rubbish models on my laptop(!) with 7b- & 13b-parameter Llama2 models.

This repo is roughly split in two main bits:

  1. A way to generate & rate short stories
  2. A web app (Python / Flask) to display the stories

Interesting files include:

Made with the following:

  • Flask
  • Sqlalchemy
  • HuggingFace
  • Langchain

Hosting

Hosted on a digital ocean droplet (which is really nice)

TODOs:

  • [-] IN PROGRESS - learn more about models (& fine-tune!)
    • Fine-tune model to determine whether text is actually a story or not (eg. huggingface fine-trained model)
    • Fine-tune model to determine whether story is good [Update: trained model (on reddit data) is useless. Need better data / better fine-tuning]
  • improve prometheus metrics!
  • allow human votes
  • use own model?!
  • log in / bot detection?
  • Grafana???
  • think of awesome monetisation ideas
  • SSL (surprisingly easy with certbot)
  • prometheus metrics or something
  • scrape reddit short stories / two sentence horror
  • tags
  • analytics!
  • sort by AI votes
  • get migrations working properly
  • make the website look half decent
  • stories page
  • stories page with lots of search-param filters. eg. tones, themes, votes

Dev tips

flask db check
flask db migrate -m 'message'
flask db upgrade
flask db history

Migrations

alembic revision --autogenerate -m "init; create stories tables"
alembic upgrade head

Contributors

will-clarke

82 commits

Languages

Python

85.1%

HTML

8.8%

Makefile

2.6%

CSS

1.8%