Skip to content

Commit

Permalink
executable working on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
galatian44to7 committed Jan 13, 2025
1 parent 406ee4c commit 4fa096b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Python_server/a5browseruse.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ a = Analysis(
['main.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
datas=[('requirements.txt', '.')],
hiddenimports=['pydantic.deprecated.decorator'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
Expand Down
11 changes: 7 additions & 4 deletions Python_server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
# uvicorn main:app --host 127.0.0.1 --port 8888 --reload --workers 1
# make sure you set OPENAI_API_KEY=yourOpenAIKeyHere to .env file

import os
os.environ["PYDANTIC_V1_COMPAT_MODE"] = "true"

from langchain_openai import ChatOpenAI
from browser_use import Agent
from dotenv import load_dotenv
import os
import platform
import asyncio
from fastapi import FastAPI, HTTPException, Query, BackgroundTasks
Expand All @@ -25,6 +27,7 @@
from fastapi.middleware.cors import CORSMiddleware



# ----------------------------
# 1. Configure Logging
# ----------------------------
Expand Down Expand Up @@ -291,7 +294,7 @@ def read_root():
# ----------------------------
# 12. Entry Point
# ----------------------------
#if __name__ == "__main__":
# import uvicorn
if __name__ == "__main__":
import uvicorn

# uvicorn.run("main:app", host="127.0.0.1", port=8888, reload=True, workers=1)
uvicorn.run("main:app", host="127.0.0.1", port=8888, reload=True, workers=1)
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ Your commands control the browser - made easy.

## Important (Experimental) Notice

This project is **experimental**.
This project is **experimental**. You can run it easily on macOS by using the executable generated in the `Python_server/dist` folder (e.g., `./a5browseruse` on macOS). For other platforms like **Linux** and **Windows**, you can build or run the server similarly (see the [Installation](#installation) steps for more details).

### Quick Start (macOS)

Note: Mac Users *should* be able to run the executable located in the `Python_server/dist` folder by navigating to the Python_server/dist folder and running `./a5browseruse`

However, if this does not work, you can follow these steps to set it up manually:

1. **Close all Chrome windows completely.**
2. **Start Chrome with Remote Debugging Enabled** (required by Browser Use):
```bash
Expand Down

0 comments on commit 4fa096b

Please sign in to comment.