{"id":13695192,"url":"https://github.com/andreasjansson/AutoCog","last_synced_at":"2025-05-03T09:31:45.275Z","repository":{"id":153512326,"uuid":"628277065","full_name":"andreasjansson/AutoCog","owner":"andreasjansson","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-30T19:42:33.000Z","size":6491,"stargazers_count":39,"open_issues_count":8,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-30T21:52:05.254Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Smarty","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/andreasjansson.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":"2023-04-15T12:58:54.000Z","updated_at":"2025-04-24T09:15:34.000Z","dependencies_parsed_at":"2024-10-03T12:32:19.532Z","dependency_job_id":"367085e0-6805-48d1-9e6a-f2431d4ac576","html_url":"https://github.com/andreasjansson/AutoCog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasjansson%2FAutoCog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasjansson%2FAutoCog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasjansson%2FAutoCog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasjansson%2FAutoCog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreasjansson","download_url":"https://codeload.github.com/andreasjansson/AutoCog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251789309,"owners_count":21644081,"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":"2024-08-02T18:00:19.181Z","updated_at":"2025-05-03T09:31:44.691Z","avatar_url":"https://github.com/andreasjansson.png","language":"Smarty","funding_links":[],"categories":["Open-source tools"],"sub_categories":[],"readme":"# AutoCog\n\n[![PyPI version](https://badge.fury.io/py/autocog.svg)](https://badge.fury.io/py/autocog)\n\n_Generate [predict.py and cog.yaml](https://github.com/replicate/cog) automatically using GPT4_\n\n![Screen recording](https://github.com/andreasjansson/AutoCog/raw/main/assets/screen-recording.gif)\n\n## Install\n\n```\npip install autocog\n```\n\n## Usage\n\nFirst, specify your AI provider with `--ai-provider` and set your OpenAI/Anthropic API key in an environment variable\n\n```\nOPENAI_API_KEY=sk-...\nANTHROPIC_API_KEY=sk-...\n```\n\nIn the repo you want to cog-ify, run\n\n```\nautocog\n```\n\nThis will generate a cog.yaml and predict.py based on the files in the current directory. It will then run the model and if it fails to run, it will attempt to fix the error and run it again. By default it has 5 attempts to fix it, which can be changed with the `--attempts` flag.\n\nIf your model needs a GPU to run, you need to run AutoCog on a GPU machine.\n\n### Human in the loop\n\nSometimes AutoCog fails to create a working Cog configuration. In those cases you, the human, have to step in and edit the cog.yaml and predict.py files.\n\nOnce you have edited them, let AutoCog continue by running `autocog` again. If you'd like to recreate `predict.py` and `cog.yaml` from scratch, run `autocog --initialize`.\n\nBy default, AutoCog will guess a `cog predict` command to run the model. If you want to specify your own predict command, use the `--predict-command` flag.\n\nIf you want AutoCog to take the generation of `cog.yaml` and `predict.py` in a specific direction, you can use the `--tell` flag to prompt GPT4:\n\n```\nautocog --tell=\"Add inputs to allow for inpainting\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasjansson%2FAutoCog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreasjansson%2FAutoCog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasjansson%2FAutoCog/lists"}