Update main.py
Browse files
main.py
CHANGED
|
@@ -83,7 +83,7 @@ from fastapi import Query
|
|
| 83 |
from deep_translator import GoogleTranslator
|
| 84 |
|
| 85 |
@app.post("/generate-story/")
|
| 86 |
-
async def generate_story(image_file: UploadFile = File(...), language: str = Query("
|
| 87 |
image_data = await image_file.read()
|
| 88 |
system_prompt = f"write an attractive story in 300 words about {random.choice(['an adventurous journey', 'a mysterious encounter', 'a heroic quest'])}"
|
| 89 |
caption = generate_image_caption(image_data)
|
|
|
|
| 83 |
from deep_translator import GoogleTranslator
|
| 84 |
|
| 85 |
@app.post("/generate-story/")
|
| 86 |
+
async def generate_story(image_file: UploadFile = File(...), language: str = Query("")):
|
| 87 |
image_data = await image_file.read()
|
| 88 |
system_prompt = f"write an attractive story in 300 words about {random.choice(['an adventurous journey', 'a mysterious encounter', 'a heroic quest'])}"
|
| 89 |
caption = generate_image_caption(image_data)
|