Coder Social home page Coder Social logo

ai-quotes-generator's Introduction

AI Text and Image Generator

This project is a JavaScript-based application that uses OpenAI's API to generate text based on user inputs and fetches an image related to the generated text from Unsplash. The generated text and image are then displayed on a web page.

How It Works

  1. Inputs: Users provide their name, favorite activity, favorite place, and set a temperature value.
  2. Text Generation: The provided inputs are used as prompts for OpenAI's API to generate text. The temperature parameter influences the randomness of the generated output.
  3. Image Fetching: The generated text is used to fetch a related image from Unsplash's API.
  4. Display: The generated text and associated image are displayed on the webpage.

Usage

To use this project, follow these steps:

  1. Clone the repository:

    git clone https://github.com/your-username/Ai-Quotes-Generator.git
    
    Set up API Keys:
    

OpenAI API: Obtain an API key from OpenAI and integrate it into the callOpenAIAPI function in utils.js. Unsplash API: Get an API key from Unsplash and integrate it into the callUnsplashAPI function in utils.js. Open index.html in a web browser or set up a local server using Node.js or Python.

Enter your name, favorite activity, favorite place, and adjust the temperature slider to generate text and fetch an associated image.

ai-quotes-generator's People

Contributors

raymanmoha avatar

Watchers

 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.