Text to Image with Machine Learning

Episode #398 by Teacher's Avatar David Kimura

Summary

In this episode, we take a new approach to the python service that our Rails background jobs will be calling. This is a more stable and thread safe approach and more simple to implement. We'll look at creating a Text to Image generation service that our Rails application will interact with.
rails artificial intelligence ai active storage 26:09

Chapters

  • Introduction (0:00)
  • The new python script approach (2:37)
  • requirements.txt (3:07)
  • Image generation python script (3:55)
  • Web interface python script (6:27)
  • Fixing typo and starting the python application (9:44)
  • Generating the Rails scaffold for images (12:02)
  • Setting up Image model (12:42)
  • Clearning up image view and controller (13:09)
  • Background processing on image create (15:04)
  • Creating the Http class (17:27)
  • Completing the background job (19:51)
  • Demo (21:22)
  • Final thoughts on the python script (23:34)
  • Talk about ai.railsapp.dev (24:51)
Student & Teacher
$ 9 /mo

Valid School Email Required

Same Access as Pro

Subscribe Now
Pro Monthly
$ 19 /mo

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Pro Annual
Autumn Sale
$ 144 190 /yr

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Teams
$ 57 /mo

3 Users Minimum

$19.00 / user / month

Same Access as Pro

Subscribe to Teams