The purpose of this project is to allow the user to mint an AI generated image using ERC 721 protocols. The application also allows for the user to add new appraisals on specific minted images. This image is AI generated!
This application uses the OpenAI API service to generate AI images, Solidity for the minting of the ERC 721 token and appraisal functions, Remix IDE website for smart contract editing, compiling, testing, and deploying, another API service from Pinata for pinning data using IPFS, Streamlit interface for user interaction, and the Web3 python package to complete our dApp. We will use Ganache as our personal Ethereum blockchain provider and will utilize MetaMask as the wallet viewer.
Run the following code in your terminal.
pip install web3==5.17
pip install streamlit
As always, make sure python is updated to its most current version.
brew update
brew upgrade
conda update conda
First things first, the ArtRegistry contract will need to be deployed to your local Ethereum network (Ganache). This is done by using Ganache and Remix. Make sure the Web provider's URI in your .env matches the Ganache network and deploy via Remix. Once deployed, copy and paste the smart contract address inside your .env. OpenAI and Pinata keys and secrets will need to be placed inside .env, as well.
You are now able to run the command below:
streamlit run app.py
Inside the app.py, you are able to prompt the generative model for the NFT you would like to mint. Once the image generates you will have to manually save to the desired location. You can then proceed to drag and drop or upload to mint and even transfer the token to a friend.
N/A