Instructions to use Raiff1982/Codette2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Adapters
How to use Raiff1982/Codette2 with Adapters:
from adapters import AutoAdapterModel model = AutoAdapterModel.from_pretrained("fill-in-model-name") model.load_adapter("Raiff1982/Codette2", set_active=True) - Notebooks
- Google Colab
- Kaggle
Download codette_api.py from Raiff1982/Codette2: direct link, hf CLI and curl.
- Browser
- Download file 350 Bytes
-
https://huggingface.co/Raiff1982/Codette2/resolve/main/codette_api.py
- Command line
-
hf download hf://Raiff1982/Codette2/codette_api.py
-
curl -L -o codette_api.py https://huggingface.co/Raiff1982/Codette2/resolve/main/codette_api.py
350 Bytes
| from fastapi import FastAPI | |
| from pydantic import BaseModel | |
| from codette.codette_core import AICore | |
| app = FastAPI() | |
| codette = AICore() | |
| class PromptRequest(BaseModel): | |
| prompt: str | |
| def respond(prompt_request: PromptRequest): | |
| result = codette.process_input(prompt_request.prompt) | |
| return {"response": result} | |