--- title: MyVillage Project Creation API emoji: 🎓 colorFrom: blue colorTo: purple sdk: docker app_port: 7860 models: - mjpsm/project-creation-qwen2.5-1.5b-sft-v1 --- # MyVillage Project Creation API A CPU-friendly (though potentially slow) FastAPI endpoint for the fine-tuned MyVillage project-creation model. **Upload the merged model to Hugging Face first.** The model repository `mjpsm/project-creation-qwen2.5-1.5b-sft-v1` must be publicly accessible, or supply `HF_TOKEN` as a Space secret for a private repository. POST `/predict` with JSON: ```json {"prompt": "Create a robotics project for middle school students", "max_new_tokens": 650, "temperature": 0.7} ``` Returns `title`, `description`, and `model`. Browse `/docs` for interactive OpenAPI documentation, `/health` for readiness. ## Operational notes * Free CPU Basic has limited throughput. Try CPU Upgrade / GPU or a 0.5B model for faster responses. * The request can take long for ~250-word descriptions; test with realistic prompts. * A public Space exposes a public endpoint. Add authentication/rate limiting before production use. * Set `MODEL_ID` in Space Variables if you change the model repository.