sakshee05 commited on
Commit
0c156f3
·
verified ·
1 Parent(s): 490e5ed

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
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)