{"id":29082474,"url":"https://github.com/garbii1/llm-application-chatbot","last_synced_at":"2025-06-27T20:36:30.248Z","repository":{"id":298588592,"uuid":"1000473126","full_name":"Garbii1/LLM-application-chatbot","owner":"Garbii1","description":"🤖 A simple AI chatbot built with Python, Hugging Face, and Flask. Powered by an open-source LLM and includes both a CLI and a web interface.","archived":false,"fork":false,"pushed_at":"2025-06-11T21:13:00.000Z","size":286,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-11T22:34:53.555Z","etag":null,"topics":["ai","beginner-friendly","chatbot","cli","flask","html-css-javascript","hugging-face","huggingface","llm","nlp","open-source","python","transformers","tutorial","web-interface"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Garbii1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-06-11T20:56:04.000Z","updated_at":"2025-06-11T21:16:47.000Z","dependencies_parsed_at":"2025-06-11T22:35:52.108Z","dependency_job_id":"49236107-e93c-4e2e-b696-ab8877f805aa","html_url":"https://github.com/Garbii1/LLM-application-chatbot","commit_stats":null,"previous_names":["garbii1/llm-application-chatbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Garbii1/LLM-application-chatbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Garbii1%2FLLM-application-chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Garbii1%2FLLM-application-chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Garbii1%2FLLM-application-chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Garbii1%2FLLM-application-chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Garbii1","download_url":"https://codeload.github.com/Garbii1/LLM-application-chatbot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Garbii1%2FLLM-application-chatbot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262329544,"owners_count":23294713,"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":["ai","beginner-friendly","chatbot","cli","flask","html-css-javascript","hugging-face","huggingface","llm","nlp","open-source","python","transformers","tutorial","web-interface"],"created_at":"2025-06-27T20:36:29.486Z","updated_at":"2025-06-27T20:36:30.207Z","avatar_url":"https://github.com/Garbii1.png","language":"CSS","readme":"# 🤖 My Simple Chatbot with Python, Hugging Face, and Flask\n\nThis is a personal project where I explored building a chatbot using open-source Large Language Models (LLMs) from Hugging Face. My goal was to learn how to create both a command-line chatbot and a web-based chatbot application, and to document my process and key takeaways here.\n\n---\n\n## 🚀 Project Overview\n\n- Command-Line Chatbot (Python)\n- Web Application Integration (Flask + JavaScript)\n\n---\n\n## 🎯 What I Learned\n\n- The components of a chatbot: Transformer, LLM, Tokenizer\n- How to use an open-source LLM from Hugging Face Hub\n- Programming a simple chatbot in Python\n- Setting up a Flask backend server\n- Integrating the chatbot into a web application\n\n---\n\n# 🟦 Part 1: Building a Command-Line Chatbot\n\n### 1.1. Prerequisites\n\n- Python 3\n- `pip` and `virtualenv`\n\n### 1.2. Setup\n\n```bash\npip3 install virtualenv\nvirtualenv my_env\nsource my_env/bin/activate\n```\n\nInstall required libraries:\n\n```bash\npython3 -m pip install transformers==4.30.2 torch\n```\n\n### 1.3. Run the Chatbot\n\n```bash\npython3 chatbot.py\n```\n\nType `exit` to end the chat.\n\n---\n\n# 🟩 Part 2: Integrating the Chatbot into a Web Application\n\n### 2.1. Prerequisites\n\n- Complete Part 1 setup\n- `git` for cloning the front-end repository\n\n### 2.2. Setup\n\nInstall Flask libraries:\n\n```bash\npython3 -m pip install flask flask_cors\n```\n\n\u003e _Note: The lab specifies `transformers==4.38.2` and `torch==2.2.1` for the web app._\n\nClone the front-end template:\n\n```bash\ngit clone https://github.com/ibm-developer-skills-network/LLM_application_chatbot\n```\n\nThis creates a `LLM_application_chatbot` directory with `static` and `templates` subdirectories.\n\n### 2.3. Configure the Front-End\n\nOpen `LLM_application_chatbot/static/script.js` and set the API endpoint URL:\n\n```javascript\nconst CHATBOT_ENDPOINT = 'http://127.0.0.1:5000/chatbot';\n```\n\n\u003e _If using a cloud IDE, use the public URL provided by your environment._\n\n### 2.4. Running the Web Application\n\nNavigate to the project directory and start the Flask server:\n\n```bash\ncd LLM_application_chatbot/\npython3 app.py\n```\n\nOpen your browser and go to [http://127.0.0.1:5000](http://127.0.0.1:5000) to chat with your bot!\n\n---\n\n## 🧪 Testing the Backend (Optional)\n\nYou can test the `/chatbot` endpoint directly with `curl` as described in the setup instructions.\n\n---\n\n## 📚 Resources\n\n- [Hugging Face Transformers Documentation](https://huggingface.co/docs/transformers/index)\n- [Flask Documentation](https://flask.palletsprojects.com/)\n\n---","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarbii1%2Fllm-application-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarbii1%2Fllm-application-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarbii1%2Fllm-application-chatbot/lists"}