--- title: Style Sync emoji: 🐠 colorFrom: pink colorTo: gray sdk: gradio sdk_version: 5.36.2 app_file: app.py pinned: false license: mit short_description: Fuses 2 paintings/images --- --- ## 🎨 Neural Style Transfer β€” A + B = C Ever wondered what Van Gogh’s brush would look like on your selfie? Or how a castle would look reimagined in Picasso’s palette? **This app lets you do exactly that.** Upload your own images or remix iconic paintings using **neural style transfer** β€” a deep learning technique that fuses the *content* of one image with the *style* of another. Watch `A + B = C` come to life in real time. --- ### πŸš€ Features - **✨ Stylize Your Own Images** Upload any two images: one for content, one for style. The result? A stunning hybrid visual that blends their essence. - **🎲 Pick Random Pairings** Not sure what to try? Click *"Pick Random & Generate"* to randomly fuse masterpieces from the [Famous Paintings](https://huggingface.co/datasets/heramb04/Famous-paintings) dataset. - **πŸ§ͺ Adjustable Optimization** Slide between fast runs and deep stylization with the step slider (100–500 iterations). - **πŸ–ŒοΈ Triptych Output** *(coming soon)* Visualize the fusion in a layout: `Content + Style = Output`. --- ### 🧠 How It Works Under the hood, this app leverages: - `torchvision`'s pretrained **VGG-19** model - **Content and style loss modules** with Gram matrices - **LBFGS optimizer** for iterative refinement - Hosted on Hugging Face Spaces using Gradio No pretraining or model uploads needed β€” everything runs on-the-fly. --- ### πŸ“ Dataset This app uses [Famous Paintings](https://huggingface.co/datasets/heramb04/Famous-paintings) hosted on Hugging Face Datasets β€” curated for visual diversity and artistic flair. You can remix any pair of artworks, or contribute your own. --- ### πŸ› οΈ Requirements This app installs the following Python packages: ``` torch torchvision gradio Pillow datasets matplotlib ``` --- ### πŸ’‘ Credits & Collaboration Built by [Heramb Joshi] Feel free to fork, remix, or contribute ideas! Pull requests, dataset expansions, and UI upgrades are welcome. ---