GithubHelp home page GithubHelp logo

momenai / ai-response-comparator-openai-s-chatgpt-vs-google-s-bard Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 324 KB

AI Response Comparator is a web app that allows users to compare the responses of OpenAI's ChatGPT and Google's Bard to a given prompt

License: MIT License

Python 100.00%

ai-response-comparator-openai-s-chatgpt-vs-google-s-bard's Introduction

AI Comparison: OpenAI's ChatGPT vs Google's Bard

This web application leverages Streamlit to create a user-friendly interface where users can enter a question or a prompt and receive responses from two AI models: OpenAI's ChatGPT and Google's Bard. This allows for an easy comparison of the outputs of the two different AI models in real time.

Examples

example1 example2

Setup

Requirements

You will need Python and pip installed on your machine. You will also need API keys for OpenAI and Google's Bard.

Installation

  1. Clone this repository to your local machine.

  2. Install the required Python packages:

    pip install streamlit openai bardapi
  3. Set up your environment variables in config.py. Replace your_openai_api_key and your_bard_api_key with your actual API keys:

    import os
    
    # Set your environment variables
    os.environ["_BARD_API_KEY"] = "your_bard_api_key"
    openai.api_key = "sk-your_openai_api_key"

Obtaining API keys

OpenAI: To obtain an OpenAI API key, you need to sign up on the OpenAI website. Once you've signed up and logged in, you can find your API key in the API section.

Google Bard: To obtain a Bard API key, open Bard in your Chrome browser, right-click and select 'Inspect' or press 'Ctrl + Shift + I', go to 'Application' then look for 'APISID' under 'Cookies'. Copy the value of 'APISID', this is your Bard API key.

Running the App

Run the following command in your terminal:

streamlit run main.py

How to Use

  1. After running the application, open your web browser and visit localhost:8501 (or the address provided in your terminal).

  2. Enter a prompt into the text input field.

  3. The application will generate responses from both ChatGPT and Google Bard, and display them side by side.

Contact

If you have any questions or feedback, please feel free to reach out.

ai-response-comparator-openai-s-chatgpt-vs-google-s-bard's People

Contributors

momenai avatar

Stargazers

Abood avatar  avatar Malek avatar  avatar

Watchers

Kostas Georgiou avatar  avatar  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.