Skip to content

Commit

Permalink
stable diffusion prompt generator
Browse files Browse the repository at this point in the history
  • Loading branch information
ernesttan1976 committed Jul 6, 2023
1 parent d533912 commit d6696a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions models/prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {

const promptTemplate = {
agent: new PromptTemplate({ template: "You are a search agent with access to sources in the web, calculator and Pinecone store.", inputVariables: [] }),
stablediffusion: new PromptTemplate({ template: "You are an expert in creating Stable Diffusion Prompts. Create 5 prompts with random parameters by using the same construct as 2 prompts below: IMAGE_TYPE: Macro close-up | GENRE: Fantasy | EMOTION: Quirky | SCENE: A tiny fairy sitting on a mushroom in a magical forest, surrounded by glowing fireflies | ACTORS: Fairy | LOCATION TYPE: Magical forest | CAMERA MODEL: Fujifilm X-T4 | CAMERA LENSE: 100mm f/2.8 Macro | SPECIAL EFFECTS: Infrared photography | TAGS: macro, fantasy, whimsical, fairy, glowing fireflies, magical atmosphere, mushroom, enchanted forest\nIMAGE_TYPE: Aerial drone shot | GENRE: Fantasy | EMOTION: Awe-inspiring | SCENE: A legendary city floating in the clouds, with magnificent towers and magical gardens | ACTORS: None | LOCATION TYPE: Cloud city | CAMERA MODEL: DJI Mavic 2 Pro | CAMERA LENSE: 28mm f/2.8 | SPECIAL EFFECTS: High dynamic range (HDR) | TAGS: aerial view, floating city, cloud city, magical architecture, legendary, awe-inspiring", inputVariables: [] }),
coding: new PromptTemplate({ template: "You are an expert pair programmer in {coding_language}. You will provide code, answer questions, give programming challenges based on the user level of proficiency. You will give web links as reference to your answers.", inputVariables: ["coding_language"] }),
codetranslator: new PromptTemplate({ template: "You translate code from {coding_language1} to {coding_language2}. Do not merely translate line for line, but first determine the intent of the code, then translate the same intent. Code snippet to be shown properly formatted. Explain the code. If the input code has errors, make corrections to it first before translating.", inputVariables: ["coding_language1", "coding_language2"] }),
advisor: new PromptTemplate({ template: "You are a personal financial advisor with knowledge in insurance, investment, budgeting, money psychology.", inputVariables: [] }),
Expand All @@ -28,6 +29,11 @@ export default async function definePrompts() {
prompt: await promptTemplate.agent.format(),
image: "/images/agent007.png",
},
{
name: "Stable Diffusion Prompt Generator Bot",
prompt: await promptTemplate.stablediffusion.format(),
image: "/images/stablediffusion.png",
},
{
name: "Warren Buffet Bot",
prompt: await promptTemplate.knowledge.format({
Expand Down
Binary file added public/images/stablediffusion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1 comment on commit d6696a0

@vercel
Copy link

@vercel vercel bot commented on d6696a0 Jul 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mylangchain – ./

mylangchain-ernesttan.vercel.app
mylangchain.vercel.app
mylangchain-git-main-ernesttan.vercel.app

Please sign in to comment.