Spaces:
Running
on
Zero
Running
on
Zero
Update style_transfer.py
Browse files- style_transfer.py +7 -7
style_transfer.py
CHANGED
@@ -41,11 +41,11 @@ class DogStyleTransfer:
|
|
41 |
# Define style to model mapping based on availability
|
42 |
if self.device == "cuda":
|
43 |
self.style_model_mapping = {
|
44 |
-
"Japanese Anime Style": "Linaqruf/anything-v3.0",
|
45 |
-
"Classic Cartoon": "nitrosocke/mo-di-diffusion",
|
46 |
-
"Oil Painting": "runwayml/stable-diffusion-v1-5",
|
47 |
-
"Watercolor": "dreamlike-art/dreamlike-photoreal-2.0",
|
48 |
-
"Cyberpunk": "dreamlike-art/dreamlike-diffusion-1.0"
|
49 |
}
|
50 |
else:
|
51 |
# Lightweight models for CPU mode
|
@@ -434,7 +434,7 @@ def create_style_transfer_tab(dog_style_transfer):
|
|
434 |
<p>After uploading your dog photo, the system will transform it into your chosen artistic style. Try different styles to create stunning effects!</p>
|
435 |
<p>The system uses specialized models for each style to ensure the best results.</p>
|
436 |
<p style="margin-top: 10px; padding: 8px; background-color: #fff9e6; border-left: 4px solid #ffd966; border-radius: 4px;"><b>⏱️ Patience is a virtue!</b> While AI is working its magic, your dog might have time to learn a new trick or two. The transformation can take up to 30 seconds, depending on how photogenic your furry friend is! 🐾</p>
|
437 |
-
<p style="margin-top: 10px; padding: 8px; background-color: #e6f9ff; border-left: 4px solid #66c2ff; border-radius: 4px;"><b>🤫 A Little Secret:</b> Although
|
438 |
<p style="margin-top: 10px; padding: 8px; background-color: #e6f9e6; border-left: 4px solid #66cc77; border-radius: 4px;"><b>✨ Unlimited Creativity!</b> Sometimes, AI might surprise you with unexpected creative interpretations, adding unique colors or features to your image. ✨</p>
|
439 |
</div>
|
440 |
""")
|
@@ -773,4 +773,4 @@ def create_style_transfer_tab(dog_style_transfer):
|
|
773 |
</div>
|
774 |
""")
|
775 |
|
776 |
-
return input_image, style_dropdown, style_button, output_image
|
|
|
41 |
# Define style to model mapping based on availability
|
42 |
if self.device == "cuda":
|
43 |
self.style_model_mapping = {
|
44 |
+
"Japanese Anime Style": "Linaqruf/anything-v3.0",
|
45 |
+
"Classic Cartoon": "nitrosocke/mo-di-diffusion",
|
46 |
+
"Oil Painting": "runwayml/stable-diffusion-v1-5",
|
47 |
+
"Watercolor": "dreamlike-art/dreamlike-photoreal-2.0",
|
48 |
+
"Cyberpunk": "dreamlike-art/dreamlike-diffusion-1.0"
|
49 |
}
|
50 |
else:
|
51 |
# Lightweight models for CPU mode
|
|
|
434 |
<p>After uploading your dog photo, the system will transform it into your chosen artistic style. Try different styles to create stunning effects!</p>
|
435 |
<p>The system uses specialized models for each style to ensure the best results.</p>
|
436 |
<p style="margin-top: 10px; padding: 8px; background-color: #fff9e6; border-left: 4px solid #ffd966; border-radius: 4px;"><b>⏱️ Patience is a virtue!</b> While AI is working its magic, your dog might have time to learn a new trick or two. The transformation can take up to 30 seconds, depending on how photogenic your furry friend is! 🐾</p>
|
437 |
+
<p style="margin-top: 10px; padding: 8px; background-color: #e6f9ff; border-left: 4px solid #66c2ff; border-radius: 4px;"><b>🤫 A Little Secret:</b> Although I designed this tool for dogs, it can actually transform any photo! Portraits, landscapes, even your favorite teddy bear, feel free to try them all! Just don't tell the other dogs… they might get jealous! 😉</p>
|
438 |
<p style="margin-top: 10px; padding: 8px; background-color: #e6f9e6; border-left: 4px solid #66cc77; border-radius: 4px;"><b>✨ Unlimited Creativity!</b> Sometimes, AI might surprise you with unexpected creative interpretations, adding unique colors or features to your image. ✨</p>
|
439 |
</div>
|
440 |
""")
|
|
|
773 |
</div>
|
774 |
""")
|
775 |
|
776 |
+
return input_image, style_dropdown, style_button, output_image
|