{"id":21930741,"url":"https://github.com/previsionio/prevision-nlp-query-app","last_synced_at":"2026-05-03T12:32:36.104Z","repository":{"id":86604781,"uuid":"429723520","full_name":"previsionio/prevision-nlp-query-app","owner":"previsionio","description":"Boilerplate to make a query in a corpus with Prevision Platform","archived":false,"fork":false,"pushed_at":"2021-11-22T10:27:57.000Z","size":277,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-21T21:39:41.169Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/previsionio.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":"2021-11-19T08:31:19.000Z","updated_at":"2021-11-22T10:28:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"aa5ebeda-ff5d-417b-9838-d31d5daf3e08","html_url":"https://github.com/previsionio/prevision-nlp-query-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/previsionio/prevision-nlp-query-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/previsionio%2Fprevision-nlp-query-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/previsionio%2Fprevision-nlp-query-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/previsionio%2Fprevision-nlp-query-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/previsionio%2Fprevision-nlp-query-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/previsionio","download_url":"https://codeload.github.com/previsionio/prevision-nlp-query-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/previsionio%2Fprevision-nlp-query-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32569712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"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":[],"created_at":"2024-11-28T23:11:16.324Z","updated_at":"2026-05-03T12:32:36.085Z","avatar_url":"https://github.com/previsionio.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deploying an image detector app\n\n## Pre-requiste\n\n- An object detector model : This app only works with Object Detector models\n- client id\n- client secret\n- model url\n- optionnal : an app url, to generate doc\n  \n## Setup for Dev \n\n- fork this project and then clone\n- fill the .env file ( see .env.example )\n- Create a python virtual env and install ( we advise you t use python 3.8)\n\n\n``` \ngit clone git@github.com:previsionio/prevision-object-detector-app.git\ncd prevision-object-detector-app.git\npython3.8 -m venv env\npip install -r requirements.txt \n\n```\n\nThen create a `.env` file from the `env.example` and fill it with the information from your model\n\n```\nclient_id=\u003cYOUR CLIENT ID\u003e\u003e\nclient_secret=\u003cYOUR CLIENT_SECRET\u003e\nmodel_url=\u003cYOUR_MODEL_URL\u003e\n```\n\n![tokens](doc-img/model_token.png)\n![model url](doc-img/model-url.png)\n\n\nThen launch server using gunicorn\n\n```\ngunicorn --reload --bind 127.0.0.1:8080 --timeout 120  --limit-request-line 0   --access-logfile - run:app\n```\n\nGo to http://localhost:8080/ and check everything is fine. You should see a webapp.  You can test the API with the curl command (  using any image you want ):\n\n```\ncurl --location --request POST 'http://localhost:8080/api/model/prediction' \\\n--form 'img=@\"./test_img.jpg\"'\n```\n\nIf both the webapp and curl command are ok, you can proceed to customisation or deployment\n\n## Customisation\n\nServer is flask based with jinja as template engine. You can edit the `app/templates/base.html` to tweak your footer and header.\n\nYou can change the content of the `app/templates/about` page or add page to you project in the `run.py` file.\n\nYou can change colors and font in the `app/styles.css` file.\n\nAbout your model, you can edit advice from object detected and threshold in the `routers/blueprint_model/adviceabout` function.\n\n## Prod\n\nIf everything is fine  you can deploy to your account. Juste deploy a new app, do not forget to fill the env var with the content of your .env file.\n\n![deploy](doc-img/model_token.png)\n\n![deploy](doc-img/deploy_app.png)\n\n![deploy](doc-img/deploy_env_var.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprevisionio%2Fprevision-nlp-query-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprevisionio%2Fprevision-nlp-query-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprevisionio%2Fprevision-nlp-query-app/lists"}