{"id":27854773,"url":"https://github.com/amine759/chattrafficviolation","last_synced_at":"2025-07-16T18:06:39.919Z","repository":{"id":288829497,"uuid":"751989585","full_name":"amine759/ChatTrafficViolation","owner":"amine759","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-09T00:48:52.000Z","size":5610,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-04T09:12:42.440Z","etag":null,"topics":["celery-task","django","huggingface-transformers","langchain","pineconedb","redis-queue"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/amine759.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":"2024-02-02T19:13:01.000Z","updated_at":"2025-01-12T06:30:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"68cde834-3b1e-4b9d-a1cd-7502a6c3c826","html_url":"https://github.com/amine759/ChatTrafficViolation","commit_stats":null,"previous_names":["amine759/chattrafficviolation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amine759/ChatTrafficViolation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amine759%2FChatTrafficViolation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amine759%2FChatTrafficViolation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amine759%2FChatTrafficViolation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amine759%2FChatTrafficViolation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amine759","download_url":"https://codeload.github.com/amine759/ChatTrafficViolation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amine759%2FChatTrafficViolation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265529079,"owners_count":23782816,"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":["celery-task","django","huggingface-transformers","langchain","pineconedb","redis-queue"],"created_at":"2025-05-04T09:12:40.501Z","updated_at":"2025-07-16T18:06:39.914Z","avatar_url":"https://github.com/amine759.png","language":"Jupyter Notebook","readme":"# ChatTrafficViolation\nThis app was made in a data science Competition context, the app does the following :\n\n![](chat-exp.png)\nIt teaches the user about the moroccan traffic violation law (French only), in the [notebooks/analysis.ipynb](notebooks/analysis.ipynb) We have explored that we can categorize the moroccan amendements to 18 classes, after some feature engineering.\n\nWe are doing clustering instead of classification as it is easier, faster and also efficient with the use of vector databases. \nThe overral backend is as follows : \n\n![](pip.png)\n\n- We are using redis and celery to optimize the response time of the chatbot, since we are performing various operations that could be done asynchronously. \nTo run the app in your local machine : \n1. clone repo\n```bash\ngit clone https://github.com/amine759/ChatTrafficViolation.git\n```\n\n- navigate inside the project directory \n```bash\ncd ChatTrafficViolation\n```\n\n2. install and create virtual environnement in your local machine \n```bash\npython3 -m venv venv # install virtual environnement\n. venv/bin/activate # this is a linux command only\n```\n\n3. install all necessary dependencies \n```bash\npip install -r requirements.txt\n```\n4. You will need to have redis installed, I'm using its docker image. Pull the image and run it. \n```bash\ndocker pull redis \ndocker run -d --name broker redis\n```\n\n5. apply django migrations\n```bash\npython3 manage.py migrate # \n```\n\n6. finally run django server\n```bash\npython3 manage.py runserver # \n```\n\n**Alternatively you can run the application from its DockerFile**: \n```bash\ndocker build -t my-app . \ndocker run -d my-app . \n```\n\n7. You will also need to run Celery workers, run as much as you want.\n```bash\ncelery -A pro worker --loglevel=DEBUG --concurrency=4 -P eventlet -n worker1\ncelery -A pro worker --loglevel=DEBUG --concurrency=4 -P eventlet -n worker2\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famine759%2Fchattrafficviolation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famine759%2Fchattrafficviolation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famine759%2Fchattrafficviolation/lists"}