Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Set WindowsProactorEventLoopPolicy for streamlit

மனோஜ்குமார் பழனிச்சாமி49e48d1d295f
diff --git a/examples/ui/streamlit_demo.py b/examples/ui/streamlit_demo.py
index 9948f2fd5..623d8811d 100644
--- a/examples/ui/streamlit_demo.py
+++ b/examples/ui/streamlit_demo.py
@@ -21,6 +21,9 @@ from browser_use.controller.service import Controller
# Load environment variables
load_dotenv()
+if os.name == 'nt':
+ asyncio.set_event_loop_policy(asyncio.WindowsProactorEventLoopPolicy())
+
# Function to get the LLM based on provider
def get_llm(provider: str):
if provider == 'anthropic':