// Example JS code structure for integrating an API in Webflow document.addEventListener('DOMContentLoaded', function() { // Function to call the ZeroGPT API function callZeroGPTAPI(inputText) { var xhr = new XMLHttpRequest(); xhr.open('POST', 'https://api.zerogpt.com/v1/endpoint', true); // Use the correct API endpoint URL xhr.setRequestHeader('Content-Type', 'application/json'); xhr.setRequestHeader('Authorization', '9446345d-a918-4966-b83d-c71edb513a36'); // Replace with your actual API key xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { var response = JSON.parse(xhr.responseText); // Handle the response from the API console.log(response); } }; var data = JSON.stringify({ "input": inputText }); xhr.send(data); } // Example of how you might call the above function // Perhaps when a button is clicked document.getElementById('your-button-id').addEventListener('click', function() { var userInput = document.getElementById('your-input-id').value; callZeroGPTAPI(userInput); }); });

Midjourney food adventures

April 2, 2023

MidJourney and other diffusion models have transformed the world of art, content creation and design. As so many of us in the AI community, our team at Passio has been actively experimenting with generative art and especially MidJourney. As the creators of Nutrition-AI we are especially excited about about the role generative models can play in food image and food art creation. In our recent post, Text-to-image Generation in Computer Vision, explored how generative models like Dall-E and Stable Diffusion can impact creation of AI datasets for computer vision and now we want to dive more into the creative side of things and explore how Midjourney can be used to create stunning food art.

MidJourney is a great tool for creating realistic food images for advertising, packaging, and menu design. With its advanced features and user-friendly interface, it allows for quick creation of beautiful food images. This post provides an in-depth look at using MidJourney for high-quality food images to achieve business goals.

Images generated by MidJourney

Script for Chat GPT:

Write without word wraps, headlines, connection words. Write back to back separated with commas and spaces:

[1], [2], [3], [4], [5]

replace [1] with a [USE YOUR PROMPT for example "a bottle of wine" or "chocolate cake"]

replace [2] with a list of detailed descriptions about [1]

replace [3] with a list of detailed descriptions about the environment of the scene

replace [4] with a list of detailed descriptions about the mood/feelings and atmosphere of the scene

replace [5] with a list of detailed descriptions about the way the prompt should be realized (eg. Photography with camera model and according settings, Painting with detailed descriptions about the materials and working material used, rendering with engine settings, and everything else that could be called output type)

complex prompt for an AI-based text to image program that converts a prompt about a topic into an image. The outcome depends on the prompts coherency. The topic of the whole scene is always depends on the subject that is replaced with [1]. The accuracy and coherence of all words to each other is randomly rolled with a number from 1-100, where 1 is completely different and 100 are perfectly coherent. The number is never written but is only used for calculation

always start the prompt with "/imagine prompt: "

always end the prompt with " --v 4"

never write anything that is in [] brackets

don't use any line breaks

when the subject looks better vertically, add "--ar 2:3" before "--v 4".

When the subject looks better horizontally, use "--ar 3:2" instead

Top Videos & Influencers We Learned From:

  1. https://youtu.be/IPx-XoOraD0
  2. https://youtu.be/NBT7hJEZw4k
  3. https://twitter.com/icreatelife