{"id":26408199,"url":"https://github.com/essogbe/g2-sentiment-analysis","last_synced_at":"2025-03-17T18:39:11.570Z","repository":{"id":281266368,"uuid":"931251441","full_name":"Essogbe/g2-sentiment-analysis","owner":"Essogbe","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-07T23:22:09.000Z","size":101,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-07T23:27:14.100Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/Essogbe.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}},"created_at":"2025-02-12T00:52:04.000Z","updated_at":"2025-03-07T23:22:12.000Z","dependencies_parsed_at":"2025-03-07T23:37:25.257Z","dependency_job_id":null,"html_url":"https://github.com/Essogbe/g2-sentiment-analysis","commit_stats":null,"previous_names":["essogbe/g2-sentiment-analysis"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Essogbe%2Fg2-sentiment-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Essogbe%2Fg2-sentiment-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Essogbe%2Fg2-sentiment-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Essogbe%2Fg2-sentiment-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Essogbe","download_url":"https://codeload.github.com/Essogbe/g2-sentiment-analysis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244090462,"owners_count":20396409,"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":[],"created_at":"2025-03-17T18:39:11.133Z","updated_at":"2025-03-17T18:39:11.555Z","avatar_url":"https://github.com/Essogbe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sentiment analysis\n\n![aviscine.png](aviscine.png)\n\nProjet d'Analyse de sentiment avec BERT et FastAPI \n\nCe projet est basé sur un entrainement et déploiement d'un modèle de classification binaire en utilisant les Transformers via BERT  et FastAPI.\n\nApplication  web : https://cine-s4gn.vercel.app\n\nAPI : https://g2-sentiment-analysis-844747804346.us-central1.run.app/docs\n\nRapport final : https://docs.google.com/document/d/1lDZlo5FaIMBxwYxUze4pZZXf0Ag2MjEX/edit?usp=drivesdk\u0026ouid=109115452173640326314\u0026rtpof=true\u0026sd=true\n\nPowerPoint : https://docs.google.com/presentation/d/1lLk-iH9e87zmPT-Fjl8XBUeJGmiEOiJX/edit?usp=drivesdk\u0026ouid=109115452173640326314\u0026rtpof=true\u0026sd=true\n\n\nNotebook : https://colab.research.google.com/drive/14fYRsI99CuV09egAwon33Gcwqnfdu6iI#scrollTo=OCNDEYHyx9ZA\n## Development Requirements\n\n- Python \u003e= 3.10\n- Pip\n- Poetry (Python Package Manager)\n\n### M.L Model Environment\n\n```sh\nMODEL_PATH=./ml/model/\nMODEL_NAME=model.pkl\n```\n### ENV Variables\n\nSet `HF_TOKEN` and `HF_API_URL` in your environment variables\n\n\n\n### Update `/predict`\n\nTo update your machine learning model, add your `load` and `method` [change here](app/api/routes/predictor.py#L19) at `predictor.py`\n\n## Installation\n\n```sh\npython -m venv venv\nsource venv/bin/activate\ncp .env.example .env\nmake install\n```\n\n## Runnning Localhost\n\n`make run`\n\n## Deploy app\n\n`make deploy`\n\n## Running Tests\n\n`make test`\n\n## Access Swagger Documentation\n\n\u003e \u003chttp://localhost:8080/docs\u003e\n\n## Access Redocs Documentation\n\n\u003e \u003chttp://localhost:8080/redoc\u003e\n\n## Project structure\n\nFiles related to application are in the `app` or `tests` directories.\nApplication parts are:\n\n    app\n    |\n    | # Fast-API stuff\n    ├── api                 - web related stuff.\n    │   └── routes          - web routes.\n    ├── core                - application configuration, startup events, logging.\n    ├── models              - pydantic models for this application.\n    ├── services            - logic that is not just crud related.\n    ├── main-aws-lambda.py  - [Optional] FastAPI application for AWS Lambda creation and configuration.\n    └── main.py             - FastAPI application creation and configuration.\n    |\n    | # ML stuff\n    ├── data             - where you persist data locally\n    │   ├── interim      - intermediate data that has been transformed.\n    │   ├── processed    - the final, canonical data sets for modeling.\n    │   └── raw          - the original, immutable data dump.\n    │\n    ├── notebooks        - Jupyter notebooks. Naming convention is a number (for ordering),\n    |\n    ├── ml               - modelling source code for use in this project.\n    │   ├── __init__.py  - makes ml a Python module\n    │   ├── pipeline.py  - scripts to orchestrate the whole pipeline\n    │   │\n    │   ├── data         - scripts to download or generate data\n    │   │   └── make_dataset.py\n    │   │\n    │   ├── features     - scripts to turn raw data into features for modeling\n    │   │   └── build_features.py\n    │   │\n    │   └── model        - scripts to train models and make predictions\n    │       ├── predict_model.py\n    │       └── train_model.py\n    │\n    └── tests            - pytest\n\n## GCP\n\nDeploying inference service to Cloud Run\n\n### Authenticate\n\n1. Install `gcloud` cli\n2. `gcloud auth login`\n3. `gcloud config set project \u003cPROJECT_ID\u003e`\n\n### Enable APIs\n\n1. Cloud Run API\n2. Cloud Build API\n3. IAM API\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fessogbe%2Fg2-sentiment-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fessogbe%2Fg2-sentiment-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fessogbe%2Fg2-sentiment-analysis/lists"}