Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.
/ text_to_image Public archive

Final Project that was deployed to GCP Cloud Run

License

Notifications You must be signed in to change notification settings

ActIII03/text_to_image

Repository files navigation

Text to Image python flask web app using docker and GCP Cloud Run

Dependencies

Pre-requisites

  • GCP account
  • RapidAPI account and API key via Dzego
  • Set env vars for API:
    • $ export RAPIDAPI_KEY=<your_rapidapi_key>
  • GCP env vars:
    • $ export GOOGLE_CLOUD_PROJECT=<your_gcp_project_id>
  • Afterwards, run get_creds.sh to get GCP credentials
    • $ ./script/get_creds.sh

To get setup

  • Note: If you want to run in a virtual environment, run the following commands:

    • $ virtualenv venv
    • $ source venv/bin/activate
    • $ pip install -r requirements.txt
    • $ flask run
  • Docker setup:

    • clone the repo
    • cd into text_to_image directory
    • build the docker image
      • $ docker build -t text_to_image .
    • run the docker image w/ local_dev script
      • $ ./script/local_dev.sh
    • open a browser and go to http://localhost:8080/

Description

  • This is a simple python flask web app that takes in a string of text and returns an image render by stability api via a REST API (POST) call.
  • The web app is built using the flask framework and is deployed using docker container on GCP Cloud Run
  • Can see prior generated images at '/' route

Deployment

  • Unfortunately, this was a school project but does utilizes GCP's Cloud Run which requires GCP account with billing enabled.

About

Final Project that was deployed to GCP Cloud Run

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published