trygithubactions / api /routers /generate_image.py
subashpoudel's picture
Included CI CD
583f6dd
raw
history blame
668 Bytes
from fastapi import APIRouter
from api.stored_data import stored_data
from src.genai.brainstroming_agent.utils.utils import generate_image
router = APIRouter()
@router.post("/generate-image")
def generate_image_endpoint():
image = generate_image(str(stored_data.get('final_story','''I don't have any story right now. Just use the business details for now.'''))
,str(stored_data.get('business_details'))
,str(stored_data.get('refined_ideation','''I don't have any idea right now. Just use the business details for now.''')))
stored_data['generated_image']=image
return {
'response':image
}