Skip to content

chore: update README #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,23 +117,25 @@ AutoNode operates based on a site-graph that defines the navigation and actions
#### Request Structure
Here is the structure of the JSON payload you need to send to the `/api/autonode/initiate` endpoint:

```
```json
{
"site_url": "string",
"objective": "string",
"graph_path": "string",
"planer_prompt": "string"

}
```

Example request:

```json
{
"site_url": "https://app.apollo.io/#/login",
"objective": "Find the list of 20 ceo, cto of tech companies in san francisco. Login into apollo using the creds example@example.com and password dummypassword@123",
"graph_path": "autonode/site_trees/apollo.json"
"planner_prompt": "apollo"
}
```

- site_url: The URL of the website AutoNode will visit and interact with.

Expand All @@ -146,7 +148,7 @@ AutoNode operates based on a site-graph that defines the navigation and actions

#### Using CURL

```
```sh
curl -X 'POST' \
'http://localhost:8001/api/autonode/initiate' \
-H 'accept: application/json' \
Expand All @@ -156,7 +158,6 @@ AutoNode operates based on a site-graph that defines the navigation and actions
"objective": "Extract product details",
"graph_path": "/path/to/your/site-graph.json"
"planner_prompt": "planner_key"

}'
```

Expand All @@ -183,12 +184,12 @@ Navigate to - `yolo/web_detection_models/` dir to find those

If you don't have enough resources on your local machine, you can host the OCR and YOLO modules on any cloud server. Following steps can be taken:

1. In your ocr/.env file, add USE_REMOTE_OCR=True and set the url for the remote service in OCR_REMOTE_URL
1. In your ocr/.env file, add `USE_REMOTE_OCR=True` and set the url for the remote service in `OCR_REMOTE_URL`

2. In your yolo/.env file, add USE_REMOTE_YOLO=True and set the url for the remote service in YOLO_REMOTE_URL
2. In your yolo/.env file, add `USE_REMOTE_YOLO=True` and set the url for the remote service in `YOLO_REMOTE_URL`

3. Update the yolo web detection model path in your yolo/.env file, add SAHI_MODEL_PATH and ULTRALYTICS_MODEL_PATH.
Example: SAHI_MODEL_PATH = yolo/web_detection_models/twitter.pt
3. Update the yolo web detection model path in your yolo/.env file, add `SAHI_MODEL_PATH` and `ULTRALYTICS_MODEL_PATH`.
Example: `SAHI_MODEL_PATH = yolo/web_detection_models/twitter.pt`



Expand All @@ -205,7 +206,7 @@ The site-graph is a JSON file that describes the structure and navigation flow o

Example of a simple site-graph:

```
```json
{
"1": {
"node_type": "clickable_and_typeable",
Expand Down Expand Up @@ -237,34 +238,35 @@ For use-cases which require downloading output, downloadable content (like outpu
- In your autonode/.env file, configure AWS keys AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from your AWS console
- In autonode/services/autonode.py, uncomment the following snippet at line 35,

```
```python
# Uncomment If you have aws account and want to store result in your AWS S3
# self.s3_client = S3Helper(access_key=self.config.AWS_ACCESS_KEY_ID,
# secret_key=self.config.AWS_SECRET_ACCESS_KEY,
# bucket_name=self.config.bucket_name)
```
and pass s3_client=self.s3_client at line 84

```
```python
s3_client=None
```
- In autonode/utils/screenshot_generator.py uncomment this on line 18,

```
```python
# Uncomment If you have aws account and want to store result in your AWS S3
s3_client.upload_file(file_path=screenshot_filename)
```
- In autonode/nodes/download.py uncomment this on line 44

```
```python
# Uncomment If you have aws account and want to store result in your AWS S3
s3_client.upload_file(file_path=download_file_path)
```

2. Storing Screenshots & Downloaded files locally
- By default, the screenshots and downloaded output are stored locally during execution and are deleted as the task completes or fails
- In autonode/worker.py comment this finally block on line 79 to persist screenshots locally,
```

```python
finally:
# Comment if you don't want to delete screenshots locally
if os.path.exists(screenshots_dir):
Expand Down