Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,8 @@ def format_meme_prompt(user_input):
|
|
22 |
"""Format user input into a meme-specific prompt"""
|
23 |
return f"Create a funny meme that shows: {user_input}. Make it in classic meme style with impact font text. Make it humorous and shareable. The image should be meme-worthy and entertaining."
|
24 |
|
25 |
-
def save_credentials(telegram_token, openai_key
|
|
|
26 |
"""Save credentials to .env file"""
|
27 |
try:
|
28 |
with open('.env', 'w') as f:
|
@@ -49,7 +50,7 @@ async def test_meme_generation(prompt):
|
|
49 |
|
50 |
try:
|
51 |
response = requests.post(
|
52 |
-
"https://api.openai.com/v1/images/
|
53 |
json=data,
|
54 |
headers=headers,
|
55 |
timeout=15
|
|
|
22 |
"""Format user input into a meme-specific prompt"""
|
23 |
return f"Create a funny meme that shows: {user_input}. Make it in classic meme style with impact font text. Make it humorous and shareable. The image should be meme-worthy and entertaining."
|
24 |
|
25 |
+
def save_credentials(telegram_token, openai_key
|
26 |
+
):
|
27 |
"""Save credentials to .env file"""
|
28 |
try:
|
29 |
with open('.env', 'w') as f:
|
|
|
50 |
|
51 |
try:
|
52 |
response = requests.post(
|
53 |
+
"https://api.openai.com/v1/images/generations",
|
54 |
json=data,
|
55 |
headers=headers,
|
56 |
timeout=15
|