Giter Club home page Giter Club logo

chatgpt-chan's Introduction

ChatGPT-chan

An implementation of https://www.insider.com/tiktok-programmer-ai-girlfriend-waifu-euthanized-stopped-working-chatgpt-2023-1

๐Ÿค– ChatGPT chan is an open-source collection of tools to have your own personal assistant in your projects. With this, you can leverage the power of OpenAI's ChatGPT language model to build conversational interfaces, automate tasks, and more. The library provides a simple API for integrating voice assistant into your projects, making it easy for developers to add AI capabilities to their applications.

Demo

https://odysee.com/@rushi:2/chatgptchandemo2:4

Requirements:

  • Python39
  • Docker

Setup:

1) Emotion Classifier (can be hosted on a different server)

git clone https://github.com/mmabrouk/chatgpt-wrapper.git

cd chatgpt-wrapper/emotion_detection

docker build -t emotion_detector .

docker run --rm -it --host net --gpus all emotion_detector

2) Stable Diffusion model (Optional, can be hosted on a different server)

git clone https://github.com/mmabrouk/chatgpt-wrapper.git

cd chatgpt-wrapper/diffusion_model

pip install transformers

# generate a huggingface token
huggingface-cli login

# move that token to `diffusion_model/`

sh build.sh

sh run.sh

My usecase is to host on raspberry pi's, the run.sh will start a webserver on port 8088, and A GET request with a text prompt like

http://127.0.0.1:8088/?prompt=panda eating ice cream

To reduce the time lag, the images have been cached to chatgptpy/anime_expressions categorized by emotions

3) ChatGPT wrapper

This includes image slideshow, cached stable diffusion expressions, text to speech, speech to text, chatgpt unofficial api

git clone https://github.com/mmabrouk/chatgpt-wrapper.git

cd chatgpt-wrapper/chatgptpy

Register for azure neural tts api here

put the keys and region in ~/.bashrc

SPEECH_KEY=<aws_speech_key>
SPEECH_REGION=<azure_region>

source ~/.bashrc

Fire up the emotion_detection server and the optional stable diffusion server from steps 1 and 2

map the IPs in chatgptpy/main.py

EMOTION_DETECTION_IP='http://127.0.0.1:5004'
STABLE_DIFFUSION_IP='http://127.0.0.1:8088'
python -m venv .venv

source .venv/bin/activate

pip install -r requirements.txt

pip install git+https://github.com/mmabrouk/chatgpt-wrapper

python main.py

Current issues

  • Chatgpt wrapper fails sometimes, and we need to switch to some other implementation of chatgpt API and this process goes on

  • The chatgpt-wrapper uses playwright, Docker implementation of which seems challenging

Credits

Buy Me A Coffee

chatgpt-chan's People

Contributors

0xrushi 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.