Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -75,9 +75,9 @@ def generate_image_prompt(english_text):
|
|
75 |
"model": "mixtral-8x7b-32768",
|
76 |
"messages": [
|
77 |
{"role": "system", "content": "You are a professional Text to image prompt generator."},
|
78 |
-
{"role": "user", "content": f"Create a text to image generation prompt about {english_text} within
|
79 |
],
|
80 |
-
"max_tokens":
|
81 |
}
|
82 |
response = requests.post("https://api.groq.com/openai/v1/chat/completions", json=payload, headers=Image_Prompt)
|
83 |
if response.status_code == 200:
|
|
|
75 |
"model": "mixtral-8x7b-32768",
|
76 |
"messages": [
|
77 |
{"role": "system", "content": "You are a professional Text to image prompt generator."},
|
78 |
+
{"role": "user", "content": f"Create a text to image generation prompt about {english_text} within 150 tokens."}
|
79 |
],
|
80 |
+
"max_tokens": 150
|
81 |
}
|
82 |
response = requests.post("https://api.groq.com/openai/v1/chat/completions", json=payload, headers=Image_Prompt)
|
83 |
if response.status_code == 200:
|