mkthoma commited on
Commit
a443056
·
1 Parent(s): a36d50f

code update

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -272,7 +272,6 @@ def image_generator(prompt = "dog", loss_function=None):
272
 
273
  # Create a wrapper function for show_misclassified_images()
274
  def image_generator_wrapper(prompt = "dog", loss_function=None):
275
- prompt = string(prompt)
276
  if loss_function == "Yes":
277
  loss_function = vibrance_loss
278
  else:
@@ -283,7 +282,7 @@ def image_generator_wrapper(prompt = "dog", loss_function=None):
283
  description = "Generate an image with a prompt and apply loss if you wish to"
284
 
285
  demo = gr.Interface(image_generator_wrapper,
286
- inputs=[gr.Textbox(label="Enter prompt for generating", type="text", default="dog sitting on a bench"),
287
  gr.Radio(["Yes", "No"], value="No" , label="Apply vibrance loss")],
288
  outputs=gr.Plot(label="Outputs"), title = "Stable Diffusion", description=description)
289
  demo.launch()
 
272
 
273
  # Create a wrapper function for show_misclassified_images()
274
  def image_generator_wrapper(prompt = "dog", loss_function=None):
 
275
  if loss_function == "Yes":
276
  loss_function = vibrance_loss
277
  else:
 
282
  description = "Generate an image with a prompt and apply loss if you wish to"
283
 
284
  demo = gr.Interface(image_generator_wrapper,
285
+ inputs=[gr.Textbox(label="Enter prompt for generating", type="text", value="dog sitting on a bench"),
286
  gr.Radio(["Yes", "No"], value="No" , label="Apply vibrance loss")],
287
  outputs=gr.Plot(label="Outputs"), title = "Stable Diffusion", description=description)
288
  demo.launch()