multimodalart HF staff commited on
Commit
30a8f33
1 Parent(s): 658bfff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -168,9 +168,11 @@ You should use {formatted_words} to trigger the image generation.
168
  widget_content = ""
169
  for index, (prompt, negative_prompt, image) in enumerate(zip(downloaded_files["imagePrompt"], downloaded_files["imageNegativePrompt"], downloaded_files["imageName"])):
170
  escaped_prompt = prompt.replace("'", "''")
171
-
 
 
172
  widget_content += f"""- text: '{escaped_prompt if escaped_prompt else ' ' }'
173
- {'parameters:\n negative_prompt: ' + repr(negative_prompt) + '\n' if negative_prompt else ''}
174
  output:
175
  url: >-
176
  {image}
 
168
  widget_content = ""
169
  for index, (prompt, negative_prompt, image) in enumerate(zip(downloaded_files["imagePrompt"], downloaded_files["imageNegativePrompt"], downloaded_files["imageName"])):
170
  escaped_prompt = prompt.replace("'", "''")
171
+ negative_prompt_content = f"""parameters:
172
+ negative_prompt: {negative_prompt}
173
+ """ if negative_prompt else ""
174
  widget_content += f"""- text: '{escaped_prompt if escaped_prompt else ' ' }'
175
+ {negative_prompt_content}
176
  output:
177
  url: >-
178
  {image}