Jonathan Korstad's picture

Jonathan Korstad PRO

jkorstad

AI & ML interests

Deep Reinforcement Learning, Generative 3D, Accessibility, Multimodal Models, Agents, Computer Vision. Staying curious.

Recent Activity

updated a collection about 2 hours ago
LLM
updated a collection about 2 hours ago
Vision Language Models
liked a Space about 2 hours ago
AP123/Janus-Pro-7b
View all activity

Organizations

Hugging Face Party @ PyTorch Conference's profile picture

jkorstad's activity

commented on We now support VLMs in smolagents! 3 days ago
view reply

Note: for the modal closing selectors please note that modals are also known as dialog elements and if built robustly should have a role="dialog" attribute in this is something that can be searched for when identifying these pop up windows.

In addition, any dialog/modal window should be closeable via the escape key as well!

Hope this helps identify modals/dialogs in a broader sense and/or helps close them out easier!

related code chunk from above for reference :)



@tool
	
def close_popups() -> str:
    """
    Closes any visible modal or pop-up on the page. Use this to dismiss pop-up windows! This does not work on cookie consent banners.
    """
    # Common selectors for modal close buttons and overlay elements
    modal_selectors = [
        "button[class*='close']",
        "[class*='modal']",
        "[class*='modal'] button",
        "[class*='CloseButton']",
        "[aria-label*='close']",
        ".modal-close",
        ".close-modal",
        ".modal .close",
        ".modal-backdrop",
        ".modal-overlay",
        "[class*='overlay']"
    ]
upvoted an article 3 days ago
view article
Article

We now support VLMs in smolagents!

β€’ 46