Git Product home page Git Product logo

bing-image-creator-cli's Introduction

banner

Bing Image Creator Tool

Description: Bing Image Creator Tool is a tool that allows you to run Bing Image Creator (I'll call it BIC) from your terminal. Due to Windows' limitations I wasn't able to create a Virtual Display such as Xvfb or Xvnc provided by PyVirtualDesktop. That's why in this project I use pyvda to create virtual desktops in Windows 10/11.

Why not use the --headless mode?: I've tried to use the headless mode but Bing refused to run any scripts while the browser is headless. This error is consistent in both Chrome and Edge. Firefox requires further testing.

Other things to include:

  • Technology stack: Two main python libraries has been used. Selenium for webscrapping and pyvda for managing desktops and windows.
  • Status: I was trying to use BIC with AutoGPT so I had to create a basic template for my needs. This is a very early version to give a designated version number.

Changelog [19.03.2024]

  • pyvda updated to 0.4.1 to work up to Windows 11 OS Build 22631.3296
  • MS Edge Driver updated to 122.0.2365.92
  • Added a selector for initial input box.
  • Bing Image Creator XPaths updated to work with 'Microsoft Designer' so it should work fine now.
  • Fixed the timeout issue for 'Non-Boosted' images.
  • Fixed the Cookie Popup issue.
  • Fix issue causuing downloading the second image instead of first too.

Known Issues

  • So far only works with Microsoft Edge because of Auto Login feature.
  • Less than 4 images are causing the tool to crash.
  • Content Policy Error, I'll fix this issue in the next update.

Example

video-0.mp4

Screenshot

banner

Image grid example

banner


Installation

To install the program run the following script

install.bat

Alternatively you can run following commands from the root of your project's directory:

git clone https://github.com/beratcmn/bing-image-creator-cli.git
cd bing-image-creator-cli
python -m venv .venv
.venv\Scripts\activate.ps1
pip install -r requirements.txt

Usage

After installing the required libraries, you can run the tool by using the run.bat file.

run.bat

You can also run the tool by running the following command in your terminal:

python src/main.py

I highly recommend you to use Microsoft Edge because it will automatically login to your Microsoft account thus removing the need to login besides it's the only browser that I've tested and it works perfectly.

Todo

  • Create dataset for Magic Prompt Feature.

    beratcmn/magic-prompt

  • Add Magic Prompt feature to the tool like in Ideogram.

    What is Magic Prompt? Magic Prompt interprets your original prompt according to your instructions and optimizes it to maximize the variety and beauty of the images generated. This feature also allows you to write your prompts in your native language for greater accuracy and ease of use by users worldwide.

  • Add a CLI for the tool.

  • Add a simple REST API for the tool.

bing-image-creator-cli's People

Contributors

beratcmn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.