Skip to content

Instantly share code, notes, and snippets.

@joelotz
Created June 6, 2022 10:32
Show Gist options
  • Select an option

  • Save joelotz/a8abe3cca7683edab1ca35cc5bce0d0f to your computer and use it in GitHub Desktop.

Select an option

Save joelotz/a8abe3cca7683edab1ca35cc5bce0d0f to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## AI Art\n",
"This is my attempt at creating art from a prompt using DALL-E flow\n",
"Joe Lotz"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"#Setup\n",
"server_url = 'grpc://dalle-flow.jina.ai:51005'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This is probably the most important step in creating a really cool image...you must define the text \"prompt\" that you want the AI to interpret. This step is commonly called \"Prompt Engineering\"."
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
"prompt = 'a tattoo on the lower back tramp stamp of two horses making sweet love by the side of a river'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's submit it to the server and visualize the results. For me this takes about 3 minutes. "
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
"</pre>\n"
],
"text/plain": [
"\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
"</pre>\n"
],
"text/plain": [
"\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment