mirror of
https://github.com/User0332/rewards-farmer.git
synced 2026-09-16 01:31:36 +00:00
add visual search custom image instructions
This commit is contained in:
@@ -19,6 +19,8 @@ cp /path/to/my_amazing_wordlist.txt nouns.txt
|
||||
|
||||
You should also have an Ollama account created (for the LLM), the `ollama` tool installed, and you should have signed in to the Ollama CLI via the command line using `ollama signin`. This project will use a minimal amount of Ollama cloud usage using `gemma4:cloud`. If you wish to use a different model, please change the `model` parameter in the `get_ollama_response` function in `src/llm_utils.py`.
|
||||
|
||||
You must also provide an image for the script to upload to complete the visual search task. Currently, this image is named `keypress_times.png` and is located in the root directory of the project (yes, I used a random image from my keyboard analysis to do this). You may provide an image of your own, just ensure that the absolute path of the image is placed in the `VISUAL_SEARCH_IMAGE_PATH` constant at the top of `rewards_tasks.py`.
|
||||
|
||||
Activate the virtual environment & install dependencies (you may have to use `python -m poetry` instead of `poetry`).
|
||||
You must have Python 3.14+ and Poetry installed.
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ import mouse_trajectory
|
||||
import mimic_typing
|
||||
import element_selectors
|
||||
|
||||
VISUAL_SEARCH_IMAGE_PATH = os.path.abspath("keypress_times.png")
|
||||
|
||||
class RewardsTaskUtils:
|
||||
def __init__(self, driver: webdriver.Edge):
|
||||
self.driver = driver
|
||||
@@ -119,7 +121,7 @@ class RewardsTaskUtils:
|
||||
|
||||
file_input = self.wait_for_element(self.elements.get_visual_search_file_input)
|
||||
|
||||
file_input.send_keys(os.path.abspath("keypress_times.png"))
|
||||
file_input.send_keys(VISUAL_SEARCH_IMAGE_PATH)
|
||||
|
||||
time.sleep(random.uniform(3, 5))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user