Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ if not os.path.exists(SAVE_DIR):
|
|
16 |
|
17 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
18 |
repo_id = "black-forest-labs/FLUX.1-dev"
|
19 |
-
adapter_id = "openfree/
|
20 |
|
21 |
pipeline = DiffusionPipeline.from_pretrained(repo_id, torch_dtype=torch.bfloat16)
|
22 |
pipeline.load_lora_weights(adapter_id)
|
@@ -74,22 +74,22 @@ def inference(
|
|
74 |
# Return just the image and seed
|
75 |
return image, seed
|
76 |
|
77 |
-
# Updated examples with 1880s clothing style
|
78 |
examples = [
|
79 |
-
"
|
80 |
-
"
|
81 |
-
"
|
82 |
-
"
|
83 |
-
"
|
84 |
-
"
|
85 |
]
|
86 |
|
87 |
-
# Improved custom CSS with better visuals
|
88 |
custom_css = """
|
89 |
:root {
|
90 |
-
--color-primary: #
|
91 |
-
--color-secondary: #
|
92 |
-
--background-fill-primary: linear-gradient(to right, #f6f9fc, #
|
93 |
}
|
94 |
|
95 |
footer {
|
@@ -174,14 +174,14 @@ button:hover {
|
|
174 |
"""
|
175 |
|
176 |
with gr.Blocks(css=custom_css, analytics_enabled=False) as demo:
|
177 |
-
gr.HTML('<div class="title">
|
178 |
|
179 |
# Add collection link below title
|
180 |
gr.HTML('<div class="collection-link"><a href="https://huggingface.co/collections/openfree/painting-art-ai-681453484ec15ef5978bbeb1" target="_blank">View the full Painting Art AI Collection</a></div>')
|
181 |
|
182 |
# Model description with the requested content
|
183 |
with gr.Group(elem_classes="model-description"):
|
184 |
-
gr.HTML('<p>Generate beautiful artwork in the style of
|
185 |
|
186 |
# Simplified structure without tabs and gallery
|
187 |
with gr.Column(elem_id="col-container"):
|
|
|
16 |
|
17 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
18 |
repo_id = "black-forest-labs/FLUX.1-dev"
|
19 |
+
adapter_id = "openfree/van-gogh" # Changed to van Gogh model
|
20 |
|
21 |
pipeline = DiffusionPipeline.from_pretrained(repo_id, torch_dtype=torch.bfloat16)
|
22 |
pipeline.load_lora_weights(adapter_id)
|
|
|
74 |
# Return just the image and seed
|
75 |
return image, seed
|
76 |
|
77 |
+
# Updated examples with 1880s clothing style for Van Gogh
|
78 |
examples = [
|
79 |
+
"van Gogh's painting of a lively outdoor gathering in the 1880s, with men in formal top hats, frock coats, and women in bustled dresses with elaborate hats, enjoying a summer afternoon. The scene captures the Belle Époque atmosphere with swirling brushstrokes and vibrant colors typical of van Gogh, highlighting the fashionable attire of the period. [trigger]",
|
80 |
+
"van Gogh's intimate portrait of a young woman from the 1880s, with her hair styled in a fashionable updo, wearing a high-necked dress with lace details and leg-of-mutton sleeves. She wears delicate jewelry and has the expressive, bold brushstrokes and vibrant color palette characteristic of van Gogh's portraiture. [trigger]",
|
81 |
+
"van Gogh's painting of two young girls in 1880s attire seated at a piano. One plays while the other stands nearby, both dressed in white frocks with ribbon details, sashes, and high collars typical of the period. The interior setting features swirling patterns, intense colors, and the bold impasto technique typical of van Gogh's style. [trigger]",
|
82 |
+
"van Gogh's painting of an elegant 1880s boating party, with gentlemen in striped boating blazers, straw boater hats, and formal trousers, alongside ladies in bustled day dresses with parasols. The scene captures the leisure activities of French society during the Belle Époque era, rendered with the artist's characteristic swirling brushstrokes and vibrant contrasting colors. [trigger]",
|
83 |
+
"van Gogh's painting of children playing in an 1880s garden scene, dressed in formal period children's wear including sailor suits for boys and pinafores with full skirts for girls. Their Victorian-era clothing contrasts with their playful activities, set against van Gogh's vibrant treatment of nature with bold, expressive brushstrokes and dramatic color combinations. [trigger]",
|
84 |
+
"van Gogh's depiction of bathers in 1880s swimming attire, showing the modest bathing costumes of the period. Women wear full-coverage dark bathing dresses with stockings, while men are in knee-length swimming suits. The figures are arranged against a backdrop of water and landscape rendered in van Gogh's distinctive swirling brushwork and bold chromatic contrasts. [trigger]"
|
85 |
]
|
86 |
|
87 |
+
# Improved custom CSS with better visuals - updated colors for Van Gogh theme
|
88 |
custom_css = """
|
89 |
:root {
|
90 |
+
--color-primary: #1A3A8F;
|
91 |
+
--color-secondary: #E09900;
|
92 |
+
--background-fill-primary: linear-gradient(to right, #f6f9fc, #f0f4e3);
|
93 |
}
|
94 |
|
95 |
footer {
|
|
|
174 |
"""
|
175 |
|
176 |
with gr.Blocks(css=custom_css, analytics_enabled=False) as demo:
|
177 |
+
gr.HTML('<div class="title">Vincent van Gogh STUDIO</div>')
|
178 |
|
179 |
# Add collection link below title
|
180 |
gr.HTML('<div class="collection-link"><a href="https://huggingface.co/collections/openfree/painting-art-ai-681453484ec15ef5978bbeb1" target="_blank">View the full Painting Art AI Collection</a></div>')
|
181 |
|
182 |
# Model description with the requested content
|
183 |
with gr.Group(elem_classes="model-description"):
|
184 |
+
gr.HTML('<p>Generate beautiful artwork in the style of Vincent van Gogh. Add [trigger] at the end of your prompt for best results.</p>')
|
185 |
|
186 |
# Simplified structure without tabs and gallery
|
187 |
with gr.Column(elem_id="col-container"):
|