{"id":25994952,"url":"https://github.com/mantreshkhurana/simple-ml-python-chatbot","last_synced_at":"2025-03-05T15:17:56.776Z","repository":{"id":215602949,"uuid":"733978237","full_name":"mantreshkhurana/simple-ml-python-chatbot","owner":"mantreshkhurana","description":"This is a simple python chatbot which uses json file to store the data. It uses TF-IDF (Term Frequency-Inverse Document Frequency) vectorizer and a Multinomial Naive Bayes classifier to classify the user input and give the response.","archived":false,"fork":false,"pushed_at":"2025-02-17T10:02:40.000Z","size":55778,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"stable","last_synced_at":"2025-02-17T11:22:09.093Z","etag":null,"topics":["chatbot","flask","machine-learning","ml","python","scikit-learn","sklearn","tf-idf"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mantreshkhurana.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-12-20T15:14:49.000Z","updated_at":"2025-02-17T10:02:44.000Z","dependencies_parsed_at":"2024-04-23T17:47:15.875Z","dependency_job_id":"6d4fad9c-c2c1-4c2c-8a08-453b270f64e0","html_url":"https://github.com/mantreshkhurana/simple-ml-python-chatbot","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":"0.11111111111111116","last_synced_commit":"a50ba4de4ed122d0a59003e5ea8e98b30d077653"},"previous_names":["mantreshkhurana/simple-ml-python-chatbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantreshkhurana%2Fsimple-ml-python-chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantreshkhurana%2Fsimple-ml-python-chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantreshkhurana%2Fsimple-ml-python-chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantreshkhurana%2Fsimple-ml-python-chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mantreshkhurana","download_url":"https://codeload.github.com/mantreshkhurana/simple-ml-python-chatbot/tar.gz/refs/heads/stable","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242048566,"owners_count":20063404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["chatbot","flask","machine-learning","ml","python","scikit-learn","sklearn","tf-idf"],"created_at":"2025-03-05T15:17:56.120Z","updated_at":"2025-03-05T15:17:56.765Z","avatar_url":"https://github.com/mantreshkhurana.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Python Chatbot\n\nThis is a simple python chatbot which uses json file to store the data. It uses TF-IDF (Term Frequency-Inverse Document Frequency) vectorizer and a Multinomial Naive Bayes classifier to classify the user input and give the response.\n\nThis project is under development and soon will be supported to web with multi modal support.\n\n## Table of Contents\n\n* [Demo](#demo)\n    * [Demo Video](#demo-video)\n    * [Screenshots](#screenshots)\n* [Installation](#installation)\n* [Usage](#usage)\n    * [API](./example.md)\n    * [Example Usage](#example-usage)\n* [Features](#features)\n* [Authors](#authors)\n\n## Demo\n\n### Demo Video\n\nhttps://github.com/mantreshkhurana/simple-ml-python-chatbot/assets/120998049/8d3d7911-98b0-4d7f-88ab-437c691b194d\n\n### Screenshots\n\n![Screenshot 1](./assets/screenshots/screenshot-1.png)\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install the required packages.\n\n```bash\npython -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\npython train.py\npython app.py\n```\n\nor\n\n```bash\npython3 -m venv venv\nsource venv/bin/activate\npip3 install -r requirements.txt\npython3 train.py\npython3 app.py\n```\n\n## Usage\n\nArguments:\n\n- `--port` or `-p`: Change the port number (default: 5000)\n- `--server` or `-s`: Change the server (default: Server is True, no UI)\n\n```bash\npython train.py\npython app.py\n```\n\nor\n\n```bash\npython3 train.py\npython3 app.py\n```\n\n### Example:\n\n```bash\npython app.py --port 5001 --server 1 # Run the server on port 5001 and hide the UI \n```\n\nor\n\n```bash\npython app.py --port 5001 --server 0 # Run the server on port 5001 and show the UI\n```\n\n### Example Usage\n\nA very basic implementation of API using Python `requests` library.\n\n```python\nimport requests\n\nurl = \"http://127.0.0.1:5000/api/chat\"\n\nif __name__ == \"__main__\":\n    while True:\n        input_data = str(input(\"Enter your question: \"))\n        data = {\"question\": input_data}\n        response = requests.post(url, json=data)\n        print(\"Bot:\", response.json()[\"response\"])\n```\n\n## Features\n\n- [x] Text support\n- [x] TTS support\n- [x] Custom response support\n- [x] YouTube Search support\n- [x] Google Search support\n- [x] Wikipedia Search support\n- [x] Google News support\n- [x] Google Maps support\n- [x] API support\n- [x] YouTube Video support\n- [ ] Conversation continuance support\n- [ ] Image search support\n- [ ] Translation support\n- [x] Image support\n- [ ] Audio support\n- [ ] Video support\n- [ ] Muliple language support\n- [ ] Markdown support\n- [ ] Speech to text support\n- [ ] Text to speech support\n- [ ] Customizable\n\n## Authors\n\n* [Mantresh Khurana](https://github.com/mantreshkhurana)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmantreshkhurana%2Fsimple-ml-python-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmantreshkhurana%2Fsimple-ml-python-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmantreshkhurana%2Fsimple-ml-python-chatbot/lists"}