salomonsky commited on
Commit
5a1d2cc
1 Parent(s): 4e386d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -89,7 +89,7 @@ async def gen(prompt, basemodel, width, height, scales, steps, seed, upscale_fac
89
  async def improve_prompt(prompt):
90
  try:
91
  instruction = ("With this idea, describe in English a detailed txt2img prompt in 300 characters at most...")
92
- formatted_prompt = f"{instruction}"
93
  response = llm_client.text_generation(formatted_prompt, max_new_tokens=300)
94
  improved_text = response['generated_text'].strip() if 'generated_text' in response else response.strip()
95
  return improved_text[:300] if len(improved_text) > 300 else improved_text
 
89
  async def improve_prompt(prompt):
90
  try:
91
  instruction = ("With this idea, describe in English a detailed txt2img prompt in 300 characters at most...")
92
+ formatted_prompt = f"{prompt}: {instruction}"
93
  response = llm_client.text_generation(formatted_prompt, max_new_tokens=300)
94
  improved_text = response['generated_text'].strip() if 'generated_text' in response else response.strip()
95
  return improved_text[:300] if len(improved_text) > 300 else improved_text