Spaces:
Sleeping
Sleeping
cleanup
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ genai.configure(api_key=os.getenv('GEMINI_API_KEY'))
|
|
9 |
# Specify model
|
10 |
model = genai.GenerativeModel('gemini-2.5-pro-exp-03-25')
|
11 |
|
12 |
-
# Function to translate text into emojis
|
13 |
def text_to_emoji(text):
|
14 |
text_cleaned = re.sub(r"[.,!?;:]", "", text)
|
15 |
prompt = f"Convert this sentence into an emoji-sequence of the same meaning and return only the emojis, no explanation:\n\n\"{text_cleaned}\""
|
@@ -26,4 +26,4 @@ iface = gr.Interface(
|
|
26 |
description="Enter a sentence, and the AI will transform it into an emoji-version 🥳"
|
27 |
)
|
28 |
|
29 |
-
iface.launch(
|
|
|
9 |
# Specify model
|
10 |
model = genai.GenerativeModel('gemini-2.5-pro-exp-03-25')
|
11 |
|
12 |
+
# Function to translate text into emojis
|
13 |
def text_to_emoji(text):
|
14 |
text_cleaned = re.sub(r"[.,!?;:]", "", text)
|
15 |
prompt = f"Convert this sentence into an emoji-sequence of the same meaning and return only the emojis, no explanation:\n\n\"{text_cleaned}\""
|
|
|
26 |
description="Enter a sentence, and the AI will transform it into an emoji-version 🥳"
|
27 |
)
|
28 |
|
29 |
+
iface.launch()
|