A FastAPI backend service that uses a fine-tuned T5 model for natural language command interpretation.
- Create a virtual environment:
python -m venv .venv
.venv\Scripts\activate- Install dependencies:
pip install fastapi transformers torch uvicornStart the FastAPI server:
python -m uvicorn main:app --reloadThe server will be available at http://127.0.0.1:8000
Health check endpoint that returns application name.
Interprets natural language commands and returns structured event data.
Request Body:
command: string (natural language command)
Example Request:
{
"command": "Plan an event titled John's birthday party and details Organize a small get-together at home priority High and date 2025-05-10 under Social category"
}Example Response:
{
"action": "create_event",
"title": "John's birthday party",
"description": "Organize a small get-together at home",
"priority": "High",
"date": "2025-05-10",
"classification": "Social"
}The application uses a fine-tuned T5 model located in the ./t5 directory for natural language processing.