Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
BATUTO90
commented
Jul 2, 2025
Owner
Author
BATUTO90
left a comment
There was a problem hiding this comment.
Es un algo que ni yo sé que hice
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BATUTO-ART
📦 Instala la librería si no está instalada
!pip install -U google-generativeai --quiet
import google.generativeai as genai
from IPython.display import display, HTML
import base64
🔐 Tu API Key
genai.configure(api_key="AIzaSyCEOtjyRUyCWxhHAJEmpJw86oO1L9_PeXo")
🧠 Modelo de generación de imagen
model = genai.GenerativeModel(model_name="models/imagen-4")
✨ Prompt estilizado (puedes modificarlo a tu gusto)
prompt = """
Ultra-realistic fashion editorial photo of a confident woman inspired by Ariana Grande.
She is wearing a distressed denim mini skirt revealing a hint of purple lace bikini bottoms,
a sheer black chiffon blouse tied below the bust exposing her toned midriff,
black thigh-high stockings with garter straps, and glossy knee-high boots.
She stands in a neon-lit urban alley at night, with reflections in wet puddles.
Her long wavy hair flows in the breeze and her lips are glossy.
High-fashion, cinematic lighting, full-body, 9:16 vertical frame, photorealistic, 8K resolution.
"""
🖼️ Generar la imagen
response = model.generate_content(
prompt=prompt,
generation_config={
"sampleCount": 1,
"aspectRatio": "9:16",
}
)
💾 Mostrar la imagen generada
for idx, part in enumerate(response.parts):
if hasattr(part, 'raw_data'):
img_bytes = part.raw_data
b64_img = base64.b64encode(img_bytes).decode("utf-8")
display(HTML(f"""
Imagen {idx + 1}
<textarea style="width:100%; height:120px">{b64_img}</textarea>
"""))