~will-clarke/story-gen

AI experiments coated in a Flask app
Readme makeover 💅
0e34071a — Will Clarke 1 year, 4 months ago
Add generate-story colab
476aae1f — Will Clarke 1 year, 4 months ago
Colab works a _little_ better

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~will-clarke/story-gen
read/write
git@git.sr.ht:~will-clarke/story-gen

You can also use your local clone with git send-email.

#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!)
    • [X] Fine-tune model to determine whether text is actually a story or not (eg. huggingface fine-trained model)
    • [X] 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
  • [X] SSL (surprisingly easy with certbot)
  • [X] prometheus metrics or something
  • [X] scrape reddit short stories / two sentence horror
  • [X] tags
  • [X] analytics!
  • [X] sort by AI votes
  • [X] get migrations working properly
  • [X] make the website look half decent
  • [X] stories page
  • [X] 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
Do not follow this link