Automate Gemini AI Studio (2.5 Pro) Q&A and Image Processing Task — Python Script with Playwright

Job ID: 39634198

Budget: ₹600 – ₹1,500 INR

Project Description:

I need an experienced Python automation developer to build a reliable, error-free script that automates two key workflows using Gemini 2.5 Pro (Experimental) inside Gemini AI Studio (web version only — no API yet).

The script must be able to process a list of text-based questions, and separately, process a folder of images to extract and reformat text based on a prompt.

Here’s what I need done:

The script must be built to handle two distinct operational modes, selectable when I run it.

Mode 1: Text-Based Q&A

I have a list of 200+ questions in Marathi in a file named Questions.txt.

I also have a Marathi prompt in Prompt.txt.

The script must:

Read each question from Questions.txt.

Combine it with the prompt from Prompt.txt.

Submit this combined text one by one into Gemini AI Studio (web interface).

Wait for Gemini’s answer (~100+ seconds per answer).

Copy the answer (in Markdown).

Save all answers in one DOCX file (properly formatted, question & answer pairs).

The script must handle 200+ questions in sequence, running automatically until all are processed.

I must be able to replace Questions.txt and Prompt.txt anytime and run the same script again smoothly — no hardcoding.


Mode 2: Image-Based Text Extraction & Processing

I will have a folder (e.g., Image_Input_Folder) containing photos of articles.

I will use the same Prompt.txt file (or a similar one).

When running in this mode, the script must:

Scan the designated image folder.

For each image, one by one, it must upload the photo to Gemini AI Studio.

It will also submit the text from Prompt.txt along with the image. (Gemini will extract the text from the image and then apply the prompt's instructions to that extracted text).

Wait for Gemini to generate the final response.

Copy the complete text answer.

Save all answers from all images into two separate, single output files:

One cumulative DOCX file containing all answers.

One cumulative Markdown (.md) file containing all answers.



Important technical points:

I already tried Selenium + ChromeDriver but faced repeated browser crashes during long runs.

I want you to use Playwright or a better, more stable alternative for headless browser automation — or suggest an equivalent robust solution.

The script must be executable in two modes (e.g., via a command-line argument like python script.py --mode text or python script.py --mode image).

The script must reliably handle file uploads for the image processing task.

The script must handle timeouts, retries, and partial progress saving to handle unexpected crashes in both modes.

The final DOCX and Markdown files must include all answers in order and be easily editable.

A simple instructions file must be provided so I can run the script (in either mode) via Command Prompt (cmd) and change the input files/folders easily.



What won’t work:

Using only Selenium — already tried, crashes on long runs.

Gemini API alone won’t work — Gemini 2.5 Pro is only available in the web UI for now.



Deliverables:

Fully working Python script with clear comments that handles both text and image modes.

A sample test run with 5–10 questions (text mode) and 3-5 images (image mode) to prove stability and correct output formatting.

Final test with my full Questions.txt file (200+ questions).

Final output files for the image task: one DOCX and one Markdown file.

Instructions on how to run it in both modes, and how to replace question/prompt files and specify the image folder.



Payment Milestones (Strongly Preferred):

20% — Show working login + successful automation for 1 text question AND 1 image upload with prompt, showing both can be triggered.

30% — Show batch run for 5–10 items in both modes, saving correctly formatted DOCX (for text mode) and both DOCX/Markdown (for image mode) outputs.

50% — Deliver full stable script, tested with all 200+ questions and a sample batch of my images, with clear instructions.



Your Skills:

Python automation (Playwright preferred)

Headless browser scripting for long-running tasks

Automating file uploads via a web interface

DOCX and Markdown file generation (python-docx, markdown libraries or similar)

Good error handling & progress saving



Bonus:

If you have experience automating Gemini AI Studio before — please mention it!



Deadline:

Looking for delivery within 5-7 days max — faster is better.



Note:

I will never share my Gemini account login. The script must run using my local login session — or provide clear instructions for me to log in once manually if needed.



If interested, please apply with:

Short explanation of how you’ll solve this (including handling the two modes).

Confirm if you’ll use Playwright or something else.

Any similar automation you’ve done before (especially with file uploads).

Estimated time to deliver each milestone.

Thanks! Looking forward to working with you.
Related categories: Python Web Scraping Image Processing Automation