-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.py
More file actions
26 lines (20 loc) · 784 Bytes
/
main.py
File metadata and controls
26 lines (20 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import os
from dotenv import load_dotenv
from src.utils import read_text_file, setup_logger, truncate_content
from src.graph import UpworkAutomation
import google.generativeai as genai
logger = setup_logger('main')
# Load environment variables from a .env file
load_dotenv()
genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
if __name__ == "__main__":
logger.info("Starting Upwork automation")
# Job title to look for
job_title = "AI agent Developer"
# load the freelancer profile
profile = read_text_file("./files/profile.md")
logger.debug(f"Freelancer profile loaded: {truncate_content(profile)}")
# run automation
automation = UpworkAutomation(profile)
automation.run(job_title=job_title)
logger.info("Upwork automation completed")