Ashrafb commited on
Commit
5515260
·
verified ·
1 Parent(s): 6a3da7b

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -80,7 +80,7 @@ import random
80
  from fastapi import BackgroundTasks
81
 
82
  @app.post("/generate-story/")
83
- async def generate_story(image_file: UploadFile = File(...), background_tasks: BackgroundTasks, target_language: str = Form(...)):
84
  image_data = await image_file.read()
85
  system_prompt = f"write an attractive story in 300 words about {random.choice(['an adventurous journey', 'a mysterious encounter', 'a heroic quest'])}"
86
  caption = generate_image_caption(image_data)
 
80
  from fastapi import BackgroundTasks
81
 
82
  @app.post("/generate-story/")
83
+ async def generate_story(image_file: UploadFile = File(...), target_language: str = Form(...), background_tasks: BackgroundTasks = BackgroundTasks()):
84
  image_data = await image_file.read()
85
  system_prompt = f"write an attractive story in 300 words about {random.choice(['an adventurous journey', 'a mysterious encounter', 'a heroic quest'])}"
86
  caption = generate_image_caption(image_data)