theminji commited on
Commit
f11c5e8
·
verified ·
1 Parent(s): 5cf32bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,9 +6,9 @@ import os
6
  import io
7
  import unicodedata
8
 
9
-
10
  app = Flask(__name__)
11
 
 
12
  genai.configure(api_key=os.environ["GOOGLE_API_KEY"])
13
 
14
  def emoji_to_text(emoji):
@@ -31,7 +31,7 @@ def is_emoji(text):
31
 
32
  def generate_creepy_emoji(emoji):
33
  description = emoji_to_text(emoji)
34
- response = genai.generate_content(
35
  model="gemini-2.0-flash-exp-image-generation",
36
  contents=(f"""
37
  Generate a hyper-realistic and highly detailed image of the {emoji} emoji. This image should depict a **realistic, textured**, and **wrinkled** version of the {description} emoji, transforming it into an unsettling and eerie representation.
 
6
  import io
7
  import unicodedata
8
 
 
9
  app = Flask(__name__)
10
 
11
+ # Configure the API key for the generative AI library
12
  genai.configure(api_key=os.environ["GOOGLE_API_KEY"])
13
 
14
  def emoji_to_text(emoji):
 
31
 
32
  def generate_creepy_emoji(emoji):
33
  description = emoji_to_text(emoji)
34
+ response = genai.models.generate_content(
35
  model="gemini-2.0-flash-exp-image-generation",
36
  contents=(f"""
37
  Generate a hyper-realistic and highly detailed image of the {emoji} emoji. This image should depict a **realistic, textured**, and **wrinkled** version of the {description} emoji, transforming it into an unsettling and eerie representation.