radames commited on
Commit
21bed62
·
1 Parent(s): 02f815e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -64,7 +64,7 @@ def inference(
64
  )
65
 
66
  # return replace_nsfw_images(result)
67
- return result.images, results.nsfw_content_detected, f"Done. Seed: {seed}"
68
  except Exception as e:
69
  return None, error_str(e)
70
 
@@ -121,7 +121,8 @@ with gr.Blocks(css="style.css") as demo:
121
  state_info = gr.Textbox(label="State", show_label=False, max_lines=2).style(
122
  container=False
123
  )
124
- error_output = gr.Markdown()
 
125
 
126
  with gr.Column(scale=45):
127
  with gr.Tab("Options"):
@@ -182,7 +183,7 @@ with gr.Blocks(css="style.css") as demo:
182
  height,
183
  seed,
184
  ]
185
- outputs = [gallery, error_output]
186
  prompt.submit(inference, inputs=inputs, outputs=outputs)
187
  generate.click(inference, inputs=inputs, outputs=outputs)
188
 
 
64
  )
65
 
66
  # return replace_nsfw_images(result)
67
+ return result.images, results.nsfw_content_detected, seed
68
  except Exception as e:
69
  return None, error_str(e)
70
 
 
121
  state_info = gr.Textbox(label="State", show_label=False, max_lines=2).style(
122
  container=False
123
  )
124
+ nsfw_output = gr.JSON()
125
+ error_output = gr.JSON()
126
 
127
  with gr.Column(scale=45):
128
  with gr.Tab("Options"):
 
183
  height,
184
  seed,
185
  ]
186
+ outputs = [gallery, nsfw_output, error_output]
187
  prompt.submit(inference, inputs=inputs, outputs=outputs)
188
  generate.click(inference, inputs=inputs, outputs=outputs)
189