First, clone this repository to your local machine:
git clone https://github.com/simoncwang/AIArtAdvisor.git
Then, create a Python environment
Conda:
conda create -n advisor-env python=3.11
Python:
python -m venv advisor-env
activate the environment with
Conda:
conda activate advisor-env
Python:
advisor-env\Scripts\activate (windows)
source advisor-env/bin/activate (Unix or MacOS)
Next, install the required packages with:
pip install -r requirements.txt
To demonstrate the functionality of the art advisor, a simple Gradio app has been created. To launch it, simply run:
python art_advisor.py
or
python3 art_advisor.py
depending on how your environment is set up.
This will create an app running on a local server, which can be found by the url provided in the terminal or command line (e.g. http://127.0.0.1:XXXX). Open this in any browser to see the app!
The Gradio app has several main sections:
Here, you can upload any image of your artwork (currently only supports .png format). You can also upload via webcam or your clipboard by selecting the icons at the bottom.
![Screenshot 2024-06-06 at 6 39 15 PM](https://private-user-images.githubusercontent.com/120291065/337457956-f1f53712-20db-44e2-9a25-85623abdff52.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMzExOTEsIm5iZiI6MTczOTMzMDg5MSwicGF0aCI6Ii8xMjAyOTEwNjUvMzM3NDU3OTU2LWYxZjUzNzEyLTIwZGItNDRlMi05YTI1LTg1NjIzYWJkZmY1Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQwMzI4MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zNDU3YWUyOWZmY2MzOTE0ZmZjZjczZDFmNzhiOWExMmE0MjkzYzZmM2NhYWRmNDc0NGIzMjA0YzkyNzdkNjY5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.XM3FXQD_JlUG_Du5qMz1yvmk8ex35SgE45vuY55Pijg)
In order for the app to make api calls to the gpt-4o model, you must provide your own OpenAI API key. However, rest assured that no one (including me) will have access to your private key since this app is hosted locally on your computer!
![Screenshot 2024-06-06 at 6 41 34 PM](https://private-user-images.githubusercontent.com/120291065/337458273-5dd94dd6-cf51-4142-94a1-67005fb4fe45.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMzExOTEsIm5iZiI6MTczOTMzMDg5MSwicGF0aCI6Ii8xMjAyOTEwNjUvMzM3NDU4MjczLTVkZDk0ZGQ2LWNmNTEtNDE0Mi05NGExLTY3MDA1ZmI0ZmU0NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQwMzI4MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03YWEwNWM0NDk1MzM3MjkwNGYxMmE5NjM2NzA1YjIwMWZmYjNhNWI3ODgxZTU0MGY2OWUzNDkwMWVkOTNjNDFiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.3ySKwNsj6cO0bB52oAuZlB9aHF7RhEMR45WDrA7PUDg)
After some time (typically 10-15 seconds depending on file size), the advisor will give you feedback/advice in the form of text here!
![Screenshot 2024-06-06 at 6 42 25 PM](https://private-user-images.githubusercontent.com/120291065/337458427-0566f999-7ed6-40a0-bbda-014f46da4bce.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMzExOTEsIm5iZiI6MTczOTMzMDg5MSwicGF0aCI6Ii8xMjAyOTEwNjUvMzM3NDU4NDI3LTA1NjZmOTk5LTdlZDYtNDBhMC1iYmRhLTAxNGY0NmRhNGJjZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQwMzI4MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xYjFiNTFlNTE0MDdjMGY2N2MzMDBiNDc0MmZmMDViZTY5ODVkMzgzNWUwMTJkOWI0Yjk4OTVlNDlhMWVkYWYzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.FCwZcOkA8pk3WBAuwayrv6-AXnlxkiVMtsrfGehP9ng)
As an example, I have uploaded an image of the famous Mona Lisa painting by Leonardo da Vinci to see what the art advisor has to say!
![Screenshot 2024-06-06 at 6 43 37 PM](https://private-user-images.githubusercontent.com/120291065/337458611-bc781c0b-3913-4f7e-919e-bb9a8dfc514f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMzExOTEsIm5iZiI6MTczOTMzMDg5MSwicGF0aCI6Ii8xMjAyOTEwNjUvMzM3NDU4NjExLWJjNzgxYzBiLTM5MTMtNGY3ZS05MTllLWJiOWE4ZGZjNTE0Zi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQwMzI4MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03MzBjY2UwZjAyM2ZiMmY2NTFhMjRkNTI5ZmY3NDIwYTM5ZGY5YTRjYjVjZjc2NWZjMzEyMzFhZTA2ZjUxOTI3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.hFwyWZvWs91ly-qylBc35ezkhBYRV_Tz6CYqpUtBrs8)
This artwork is widely recognized as the "Mona Lisa," an iconic painting by Leonardo da Vinci. Here is some constructive feedback on this masterpiece:
Use of Light and Shadow (Chiaroscuro):
- The subtle gradation of light and shadow creates a lifelike three-dimensionality and a tender, almost ethereal quality. This technique brings forward the subject with a delicate realism.
Composition:
- The composition is perfectly balanced with the subject placed using the rule of thirds. The way the figure is framed against the background adds depth and guides the viewer's eye seamlessly through the painting.
Expressive Face and Emotion:
- The enigmatic expression of the subject, often described as an ambiguous smile, invites a range of interpretations and emotions, making the artwork profoundly engaging and mysterious.
Detail and Texture:
- The intricate detailing on the subject's hair, clothing, and the subtle textures of the skin showcase exceptional skill and attention to detail.
Varnish Yellowing:
- Over time, the varnish has yellowed, altering the original colors. Restorative work could potentially address this issue to bring back the painting's initial vibrancy.
Background Detailing:
- While the background features beautifully misty landscapes, some critics might argue for a slightly more detailed rendering of elements to match the meticulous detail in the foreground subject.
Posture and Hand Position:
- The posture and hand position of the subject are serene but could be viewed as somewhat stiff. Exploring slightly more relaxed or dynamic poses could add an additional layer of naturalism.
Cohesion Between Foreground and Background:
- There is a slight stylistic difference between the hyper-realistic figure and the more abstract, sfumato background. A more cohesive blending of these elements could enhance the overall unity of the painting.
Overall, the "Mona Lisa" remains a timeless piece of art that continues to captivate viewers and artists alike. The feedback offered is in the context of taking an already renowned piece and discussing areas that provoke thought rather than suggesting fundamental changes to what many consider perfection.