For AI Evals Course
This is the companion repo that has shareable information used in Isaac Flath's annotation app in fasthtml workshop.
It contains everything covered in the talk + more.
The slides can be found here
Video of the talk can be found here
Credit: Thank you to Wayde Gilliam (ohmeow) for contributions to fastapi/react app version, documentation, readme, uv dependency setup, and more.
I like it because it feels like the most python native web development framework with the least boilerplate.
But if you're happy with fastapi, flask, django, nextjs, etc. those are fine to use too!
This talk shows a tool, but the tool you choose isn't actually the important thing. But you've got to choose one, and this is the one I find makes me most productive in this use-case.
The talk can be found in presentation/talk.html
. Open it in any browser.
Agenda
- Discuss the real world use case
- Show the actual application
- Brief "what is FastHTML"
- Walk through and explain code of a minimal version (code available after the lecture)
- Resources & Q&A
There are 2 application in this repository showing introductory simple annotation apps.
fasthtml_app/main_in_memory.py
: Best place to start to understand how things work in a simple example. Supports only good/bad rating, stores ratings in a python dict, uses a csv file for the dataset, and lets you download the ratings in a json. This is intended to be a way to learn incrementally, not be the ideal app.fasthtml_app/main_sqlite.py
: This is a full annotation app that uses a sqlite database. While minimal it has the core features you need to get started and is an example of a great starting point for this use-case. This includes both rating and annotating the results.
To run check out the fasthtml app's readme
There's a fastapi/react version in fastapi_react_app
- check out the fastapi/react app's readme to run both the frontend and backend.
I can't teach you everything you need to know in an hour. Here's some resources to help dive in more:
- Introduction of fasthtml interactivity from the HTMX perspective
- A walkthrough of a couple simple fasthtml apps
- Example Search and Annotation App
- FastHTML Gallery to see minimal examples of different functionality
- FastHTML Docs
- MonsterUI Docs
FastHTML apps are starlette apps (same foundation as FastAPI). They can be deployed anywhere any regular web app can be deployed, because they are a regular web app.
The easiest places to deploy are:
- Modal: You got free credits for signing up for the course course so use them!
- Railway: Easy to deploy. If you don't know what to use, use this.
- Check out Answer AI's FastHTML Deploy repo for more options