GithubHelp home page GithubHelp logo

wp_02_ec_ai_24q2's Introduction

Latest Release Static Badge Static Badge

WP_02_EC_AI_24Q2-AI_Joke_Generator

Weekend Project 02 - Encode Club AI BootCamp 24Q2 Repository

Project Overview

This project is part of the Encode Club AI BootCamp and involves creating a new application from scratch using Next.js, focusing on generating jokes using AI. The application will allow users to customize various joke parameters and generate jokes based on their preferences. Additionally, the AI will evaluate the generated jokes for humor, appropriateness, and potential offensiveness. The project leverages the Text Generation WebUI to serve text generation tasks.

Features

  • Joke Generation: Generate jokes using AI with customizable parameters.
  • Customizable Parameters:
    • Topic (e.g., work, people, animals, food, television)
    • Tone (e.g., witty, sarcastic, silly, dark, goofy)
    • Type of joke (e.g., pun, knock-knock, story)
    • Temperature (randomness/fun level)
  • Joke Evaluation: AI evaluates jokes for humor, appropriateness, and offensiveness.
  • Integration with Text Generation WebUI: Serve text generation tasks using the WebUI.

Project Members Group 9

Installation

Prerequisites

Before you begin, ensure you have the following installed:

Installing

  1. Clone the Repository

    git clone https://github.com/90barricade93/ai-joke-generator
    cd ai-joke-generator
  2. Install Dependencies

    Using npm:

    npm install ai openai
  3. Set Up Environment Variables

    Create a .env.local file in the root directory and add a placeholder for your OpenAI API environment variables to prevent ⨯ Error: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).

    OPENAI_API_KEY="placeholder"
  4. Run the Development Server

    Using npm:

    npm run dev
  5. Run the Text Generation WebUI

    Follow the instructions in the Text Generation WebUI documentation to set up and run the WebUI on your local environment.

    cd /path/to/text-generation-webui
    ./start_linux.sh -api

Conclusion

This project demonstrates the integration of Next.js with AI capabilities, providing users with a fun and interactive way to generate jokes. By customizing parameters and evaluating the generated content, users can explore the capabilities of AI in creative content generation. The Text Generation WebUI serves as a powerful backend for handling text generation tasks, showcasing the potential of local AI model deployment.

Feel free to contribute, suggest improvements, or ask questions. Happy coding!

Acknowledgements

We would like to thank the Encode Club AI BootCamp for this opportunity and @mpagani for his guidance.

GitHub forks   © GROUP 9 - AI 24Q2   GitHub stars


wp_02_ec_ai_24q2's People

Contributors

90barricade93 avatar alessiochen avatar

Watchers

 avatar  avatar

wp_02_ec_ai_24q2's Issues

Generated text doesn't appear in the text area

After selecting the options and pressing the generate button, the chat api communicates with the model and the model starts generating.

The generated text doesn't appear in the text area.

I called the component in the page.tsx and worked in component joke-generator.tsx where I called the textarea component and added a default text and the result (I guess)

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.