Giter Site home page Giter Site logo

nft-ai-generated's Introduction

Create and Mint NFT using AI

This project is forked from dappuniversity/ai_nft_generator. The enhancements made are to be able to publish the smart contract and the NFTs on the Energi blockchain. Once published, the NFTs can be traded on the GonnaMakeIt Marketplace.

A. Technology Stack & Tools

B. Requirements For Initial Setup

C. Setting Up

1. Clone/Download the Repository

git clone https://github.com/SMART-Corporation/nft-ai-generated.git

2. Install Dependencies:

cd nft-ai-generated
npm install

3. Create APIs:

Create an account on Hugging Face. Visit your profile settings, and create a read access token.

Create an account on NFT.Storage, and create a new API key.

4. Setup .env file:

Before running any scripts, create a .env file by copying .env.example. Edit the following:

  • ACCOUNT_PRIVATE_KEY="" - Get the private key for your owner account from MetaMask
  • REACT_APP_HUGGING_FACE_API_KEY="" - Populate the API from step 3 above
  • REACT_APP_NFT_STORAGE_API_KEY= - Populate the API from step 3 above. Do not put any quotes around the API

5. Name your collection

Edit lines 4, 5 and 6 of scripts/deploy.js:

  const NAME = "AI Generated NFT"
  const SYMBOL = "AINFT"
  const COST = ethers.utils.parseUnits("1", "ether") // 1 NRG
  • NAME - Name of collection as you want it to appear on the Marketplace
  • SYMBOL - Token Symbol of your collection
  • COST - Minting cost

6. Update Constructor Arguments

Edit scripts/constructor-arg.js.

module.exports = [
    "AI Generated NFT", 
    "AINFT", 
    "1"
];

The entires should match the information set in scripts/deploy.js in step 5 above.

7. Run deployment script

Deploy the smart contract to Energi Testnet.

npx hardhat run ./scripts/deploy.js --network energiTestnet 
npx hardhat verify <contract_address> --constructor-args ./scripts/constructor-arg.js

8. Start frontend

npm run start

The above will start a web browser instance. If you are using the Brave Browser, turn shield off to "http://localhost:3000".

9. Create and Mint your AI Generated NFTs

  • 1. Connect your Owner Wallet
  • 2. Give a name for the image
  • 3. Add a description to your NFT. The AI NFT Generator will take the description and create an NFT.
  • 4. Click "Create & Mint" to generate an NFT using the AI, post the NFT to IPFS and mint it on the Energi Blockchain. You will have to pay the minting cost.

Webpage

Once minted the image of the NFT will appear on the box to the right. Go to GMI Testnet Marketplace to view your collection.

Have fun with your NFTs!

D. YouTube Video

If you want details on how the code works, view the following YouTube video:

Contributions

Please send any contributions as ETH (on the Ethereum chain) or NRG (on the Energi chain) to the following account:

0x3E9764ee008697849292511d278E8a05e1Fbba27

nft-ai-generated's People

Contributors

zalam003 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.