When you run FastAPI app with uvicorn, it starts the app from main.py rather than directly executing your script. The working directory is likely set to the project root (project-astra), so python tries to find the prompts module from this folder. If it can't find it, you get the ModuleNotFoundError.
Try to add a . before prompts in classification_pipeline:
from .prompts import (
json_example, json_extractor_prompt,
definitions
)
This will make python look for prompts inside the current pack where is classification_pipeline.py