Update main.py
Browse files
main.py
CHANGED
|
@@ -207,7 +207,7 @@ async def segment_image(
|
|
| 207 |
async def segment_image(image_url: str = Form(...), text_prompt: str = Form(...)):
|
| 208 |
try:
|
| 209 |
# process text prompt using openai chat
|
| 210 |
-
text_prompt = chat(text_prompt)
|
| 211 |
|
| 212 |
logger.info(f"Starting LangSAM segmentation for image URL: {image_url} with prompt: {text_prompt}")
|
| 213 |
image_pil = load_image_from_url(image_url)
|
|
|
|
| 207 |
async def segment_image(image_url: str = Form(...), text_prompt: str = Form(...)):
|
| 208 |
try:
|
| 209 |
# process text prompt using openai chat
|
| 210 |
+
text_prompt = chat(text_prompt.content)
|
| 211 |
|
| 212 |
logger.info(f"Starting LangSAM segmentation for image URL: {image_url} with prompt: {text_prompt}")
|
| 213 |
image_pil = load_image_from_url(image_url)
|