{"id":18431995,"url":"https://github.com/firehead90544/crap-bot","last_synced_at":"2026-03-07T16:01:29.377Z","repository":{"id":254588190,"uuid":"615796030","full_name":"FireHead90544/Crap-Bot","owner":"FireHead90544","description":"A deep learning-powered chatbot written in python which just works.","archived":false,"fork":false,"pushed_at":"2024-08-24T14:23:57.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T18:43:32.580Z","etag":null,"topics":["ai","aiml","artificialintelligence","chatbot","deeplearning","machinelearning","neuralnetwork","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FireHead90544.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-18T17:47:29.000Z","updated_at":"2024-08-24T14:24:00.000Z","dependencies_parsed_at":"2024-08-24T15:50:45.665Z","dependency_job_id":null,"html_url":"https://github.com/FireHead90544/Crap-Bot","commit_stats":null,"previous_names":["firehead90544/crap-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FireHead90544/Crap-Bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireHead90544%2FCrap-Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireHead90544%2FCrap-Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireHead90544%2FCrap-Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireHead90544%2FCrap-Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FireHead90544","download_url":"https://codeload.github.com/FireHead90544/Crap-Bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireHead90544%2FCrap-Bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30221193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T14:02:48.375Z","status":"ssl_error","status_checked_at":"2026-03-07T14:02:43.192Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","aiml","artificialintelligence","chatbot","deeplearning","machinelearning","neuralnetwork","python"],"created_at":"2024-11-06T05:27:03.893Z","updated_at":"2026-03-07T16:01:29.332Z","avatar_url":"https://github.com/FireHead90544.png","language":"Python","readme":"# Crap-Bot\nA deep learning-powered chatbot written in python which just works.\n\n## About\nAn open source release of the chat bot based on the Sequential deep learing model created to be deployed on a [college's website](https://ittanakpur.ac.in/). It was named Crap-Bot because why not? Because, we just felt like doing that, no definite reasons, we just felt good, no good lying.\n\n## Usage\nTo use this bot, you need to have python3 installed on your system. This bot was created and tested against python 3.11.0, but it should work with any python 3 version. Follow the instructions below to get started.\n\n1. Clone the repository and cd into the directory.\n```bash\ngit clone https://github.com/FireHead90544/Crap-Bot\ncd Crap-Bot\n```\n\n2. Create a virtual environment.\nIt's a good practice to create a virtual environment for each project. This will keep your system's python installation clean and will prevent any conflicts with other projects. To create a virtual environment install `virtualenv` using pip (`pip install virtualenv`), and run the following command.\n```bash\nvirtualenv venv\n```\n\n3. Activate the virtual environment.\n```bash\nsource venv/bin/activate # Linux\n.\\venv\\Scripts\\activate # Windows\n```\n\n4. Install the required dependencies.\n```bash\npip install -r requirements.txt\n```\n\n5. Prepare your dataset.\nThe bot uses a dataset to train itself. The dataset should be a json file named `train_data.json` which contains the training data, in a particular format. A sample `train_data.json` can be found in the repository.\n\nOnce you have done this, you can start training/testing the bot.\n\n\n## Training\nTo train the bot, create a python file and write the below equivalent code and run it.\n```py\nfrom train import CrapBotModel\n\nmodel = CrapBotModel() # Instantiate the crap bot\n\nmodel.create_train_data() # Prepares the data in numeric form as arrays.\nmodel.prepare_model() # Prepares the actual Sequential model for training.\n\nprint(model.model_summary()) # Shows the summary of the model about the neural network formed.\n\nmodel.train_model(epochs=2000) # Trains the model, epochs represents the number of steps the model will train itself.\nmodel.save_model(\"weights.h5\") # Saves the model to a file.\n```\nThis will train the model using the given dataset and save the model file to `weights.h5`. You can change the name of the file to whatever you want and load it later to retrain it or to test it out to make predictions.\n\n## Re-training / Fine-tuning\nTo retrain the model, you can load the model file and train it again. The code below shows how to do that.\n```py\nfrom train import CrapBotModel\n\nmodel = CrapBotModel() # Instantiate the crap bot\n\nmodel.load_model(\"weights.h5\") # Load the model file named 'weights.h5'\nmodel.create_train_data() # Prepares the updated data from `train_data.json` in numeric form as arrays. You can add new data to the json file and retrain the model without having to create the model again.\n\nprint(model.model_summary()) # Shows the summary of the model about the neural network formed.\n\nmodel.train_model(epochs=500) # Trains the model, epochs represents the number of steps the model will train itself.\nmodel.save_model(\"weights2.h5\") # Saves the model to a file.\n```\nThis will re-train or fine-tune the previously trained model with the new added data to a file named `weights2.h5` without having to create the model and train it from scratch. It basically reduces the time required to train the new model instead of creating it from scratch since it trains over the already trained model, thus making it more accurate.\n\n## Testing\nTo test the model, you can load the model file and test it. The code below shows how to do that.\n```py\nfrom test import Predict\n\npredict = Predict(\"weights.h5\") # Loads the model file and instantiates the prediction.\nmsg = \"Hello.\"\npredict.chat(msg) # Predicts the response to the message.\n```\nThis will load the model file named `weights.h5` and predict the response to the message `Hello.`. You can change the message to whatever you want and test it out.\n\n## License\nThis is licensed under the [GNU GPL v3](https://raw.githubusercontent.com/FireHead90544/Crap-Bot/main/LICENSE) license.\n\n\n**Dear crappy peoples, enjoy crapping your crap-talks with the crap-bot!**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirehead90544%2Fcrap-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirehead90544%2Fcrap-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirehead90544%2Fcrap-bot/lists"}