Spaces:
Build error
Build error
Update gradio_ui.py
Browse files28 unmodified lines2930313233343536373839404128 unmodified lineselse:return [], "Error: Invalid mode selected."# Extract images and their captionsimages = []captions = []for match in results:image_path = match["metadata"]["image_path"]caption = ", ".join(match["metadata"].get("captions", []))images.append(image_path)captions.append(f"Score: {match['score']}\nCaption: {caption}")return images, "\n\n".join(captions)28 unmodified lines293031323334353637383940414228 unmodified lineselse:return [], "Error: Invalid mode selected."# Extract images and their captionsimages = []captions = []for match in results:image_filename = match["metadata"]["image_path"].split("\\")[-1] # Extract the filenameimage_url = f"https://Dev24910-VisionVerse-Search.hf.space/file/workspace/images/{image_filename}"caption = ", ".join(match["metadata"].get("captions", []))images.append(image_url)captions.append(f"Score: {match['score']}\nCaption: {caption}")return images, "\n\n".join(captions)
gradio_ui.py+4-3