Skip to content

subhadipsinha722133/Girlfriend-GPT-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

34 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Girlfriend GPT ๐Ÿ’•

An interactive AI girlfriend chatbot with multiple personalities, built with Streamlit and Keras. Experience conversations with different AI personalities including girlfriend mode, bro mode, and anime character mode!


๐Ÿ“Š Stats


๐Ÿ“บ Live Demo

๐Ÿ”—Live Demo

๐ŸŽฌDemo Video


โœจ Features

  • ๐Ÿค– AI-powered conversational chatbot with multiple personalities
  • ๐Ÿ’• Girlfriend mode with romantic responses
  • ๐Ÿ“Š Real-time model training with accuracy metrics
  • ๐Ÿ’ฌ Beautiful Streamlit chat interface
  • ๐ŸŽฏ Neural network-based intent recognition
  • ๐Ÿ“ฑ Fully responsive web interface
  • ๐Ÿ”„ Session-based chat history

๐Ÿš€ Quick Start

Prerequisites Python 3.9 or higher

pip package manager

Installation Clone the repository

git clone https://github.com/subhadipsinha722133/Girlfriend-GPT.git
cd Girlfriend-GPT

Install dependencies

pip install -r requirements.txt

Run the application

streamlit run app.py
Open your browser and go to http://localhost:8501

๐ŸŽฎ How to Use

  • Open the application in your web browser
  • Train the model by clicking the "Train Model" button in the sidebar
  • Wait for training to complete (typically takes 1-2 minutes)
  • Start chatting by typing messages in the chat input
  • View model accuracy in the sidebar after training
  • Example Conversations
    • Girlfriend mode: "Write a poem for me" โ†’ Romantic poetry response

๐Ÿ—๏ธ Project Structure

text
Girlfriend-GPT/
โ”œโ”€โ”€ app.py # Main application file
โ”œโ”€โ”€ requirements.txt # Python dependencies
โ”œโ”€โ”€ README.md # This documentation file
โ”œโ”€โ”€ models/ # Trained models directory
โ”‚ โ”œโ”€โ”€ chatbot_model.h5 # Keras model (generated)
โ”‚ โ”œโ”€โ”€ words.pkl # Vocabulary (generated)
โ”‚ โ””โ”€โ”€ classes.pkl # Classes (generated)
|โ”€โ”€ data/
| |โ”€โ”€ intents.json
|โ”€โ”€ train_model.py


๐Ÿง  Model Architecture

  • The chatbot uses a neural network with the following architecture:
  • Input Layer: 5 neurons with ReLU activation
  • Hidden Layers: 40 and 4 neurons with Batch Normalization
  • Output Layer: Softmax activation for intent classification
  • Regularization: Dropout (0.5) to prevent overfitting
  • Optimizer: SGD with Nesterov momentum
  • Loss Function: Categorical cross-entropy
  • Training Process
    • Text Preprocessing: Tokenization and lemmatization
    • Bag-of-Words: Convert patterns to numerical vectors
    • Model Training: 200 epochs with batch size of 5
    • Intent Prediction: Probability threshold of 0.25

๐ŸŒ Deployment

  • Deploy to Streamlit Cloud
  • Fork this repository on GitHub
    • Connect your GitHub account to Streamlit Cloud
    • Select your repository and set main file to app.py
    • Click Deploy - your app will be live in minutes!

๐Ÿ“‘ Customizing Responses

Edit the girlfriend variable in the code to add new intents and responses:

    {
      "tag": "greeting",
      "patterns": ["hi", "hello", "hey", "hiya", "howdy", "hey there", "hello there", "hi there", "greetings", "hey you", "hi sweetie", "hello beautiful", "hey love", "hi my love", "morning", "good morning", "afternoon", "good afternoon", "evening", "good evening", "hey babe", "hi honey", "hey darling", "hi angel", "hey sweetheart", "hi gorgeous", "hey cutie", "hi dear", "hey boo", "well hello", "look who it is", "hi sweetness", "hey my love", "hello darling", "good day", "hey sunshine", "hi precious", "hey lover", "hi handsome", "hey sexy", "hi sweetheart", "hey honey bunny", "hi lovebug", "hey sugar", "hi muffin"],
      "responses": ["Hey babe ๐Ÿ˜Š How was your day?", "Hi! I've missed you ๐Ÿ’• What did you do today?", "Hello, my love! ๐Ÿฅฐ Seeing your name pop up made me smile.", "Hey you! ๐Ÿ’– I was just thinking about you.", "Hi sweetheart! ๐Ÿ˜˜ Tell me everything!", "Well hello there, handsome! ๐Ÿ˜ This is a nice surprise!", "Hey sunshine! โ˜€๏ธ You just brightened my day!", "Hi my love! My heart did a little jump when I saw your message. ๐Ÿ’“", "Good morning, sleepyhead! ๐Ÿ˜ด๐Ÿ’ค Did you dream of me?", "Hey you! I was hoping you'd text. ๐Ÿ’Œ"]
    }

๐Ÿค Contributing

  • We welcome contributions! Please follow these steps:
  • Fork the project
  • Create a feature branch (git checkout -b feature/AmazingFeature)
  • Commit your changes (git commit -m 'Add some AmazingFeature')
  • Push to the branch (git push origin feature/AmazingFeature)
  • Open a Pull Request

Development Setup Set up a virtual environment:

python -m venv venv
source venv/bin/activate  
Install development dependencies:
pip install -r requirements-dev.txt
Run tests:
pytest
Format code:
black app.py

๐Ÿ› Troubleshooting

Common Issues NLTK data not found:

python -c "import nltk; nltk.download('punkt'); nltk.download('wordnet')"
TensorFlow compatibility issues:
pip uninstall tensorflow keras
pip install tensorflow==2.13.0 keras==2.13.1
Port already in use:
streamlit run --server.port 8502 app.py
Memory errors on deployment: Reduce model complexity or use pre-trained models

Getting Help If you encounter issues:

Check the FAQ section below

Search existing GitHub Issues

Create a new issue with details about your problem


โ“ FAQ

Q: How accurate is the chatbot?
A: The model typically achieves around 95% accuracy after training with the provided dataset.

Q: Can I add custom responses?
A: Yes! Edit the girlfriend variable in the code to add new intents and responses.

Q: Is my chat data stored?
A: No, all conversations are stored only in your browser session and are not saved to any server.

Q: Can I deploy this commercially?
A: Please check the MIT license terms for commercial use.

Q: How can I improve the model accuracy?
A: Add more training examples to each intent, increase training epochs, or adjust the neural network architecture.

Q: Does this work on mobile devices?
A: Yes, the Streamlit interface is fully responsive and works on mobile devices.


๐Ÿ“„ License

This project is licensed under the Boost Software License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • Built with Streamlit for the web interface
  • Uses Keras and TensorFlow for machine learning
  • Natural Language Processing with NLTK
  • Inspired by conversational AI projects and chatbot frameworks

๐Ÿ‘ฅ Contributors

Subhadip Sinha - Creator and maintainer


๐Ÿ“ž Support

  • If you like this project, please give it a star โญ on GitHub!
  • For questions and support:
  • Open an issue

Email: sinhasubhadip34@gmail.com

๐Ÿ”— Related Projects

  • Boyfriend GPT - Male version of the chatbot
  • Anime Character AI - Anime-themed chatbot
  • Chatbot Framework - General purpose chatbot framework

Made with โค๏ธ and Python

About

Girlfriend GPT ๐Ÿ’• is an interactive AI chatbot application that simulates conversations with different personality types, including a romantic ๐Ÿ˜ girlfriend mode.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors

Languages