PyWebSol commited on
Commit
e76f736
·
verified ·
1 Parent(s): 026eb96

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -34,9 +34,9 @@ def draw_on_image(image, prompt):
34
  return res_image
35
 
36
  inputs = [
37
- gr.Image(tool="sketch", label="Image", type="pil"),
38
- gr.Text(max_lines=1)
39
- ]
40
 
41
  if torch.cuda.is_available():
42
  torch_dtype = torch.float16
@@ -51,6 +51,6 @@ pipeline = AutoPipelineForInpainting.from_pretrained(
51
 
52
  pipeline.to(device)
53
 
54
- app = gr.Interface(draw_on_image, inputs=inputs, outputs="image", title="Stable Diffusion Inpainting", description="EN: To use it, you need to select an object in the image and enter in the prompt line what you want to see in place of this object.\nIf you received a black image, then the neural networks in HuggingFace identified the result as pornography. Try again.\n \nRU: Для использования, вам необходимо выделить объект на изображении и ввести в строку \"prompt\" то, что вы хотите видеть на месте данного объекта.\nЕсли вы получили изображение черного цвета, то нейронные сети в Hugging Face идентифицировали результат как порнографию. Пробовать снова.\n \nTelegram channel of the author: t.me/PyWebChan")
55
  app.queue()
56
  app.launch(share=True)
 
34
  return res_image
35
 
36
  inputs = [
37
+ gr.Image(tool="sketch", label="Image", type="pil"),
38
+ gr.Text(max_lines=1)
39
+ ]
40
 
41
  if torch.cuda.is_available():
42
  torch_dtype = torch.float16
 
51
 
52
  pipeline.to(device)
53
 
54
+ app = gr.Interface(draw_on_image, inputs=inputs, outputs="image", title="Stable Diffusion Inpainting", description="EN: To use it, you need to select an object in the image and enter in the prompt line what you want to see in place of this object.\nIf you received a black image, then the neural networks in HuggingFace identified the result as pornography. Try again.\n \nRU: Для использования, вам необходимо выделить объект на изображении и ввести в строку \"prompt\" то, что вы хотите видеть на месте данного объекта.\nЕсли вы получили изображение черного цвета, то классификатору не нравится ваша фотка. Попробуйте снова.\n\n\n**Топовый антиспам для телеграм-групп: https://t.me/RuModeratorAI_Bot**")
55
  app.queue()
56
  app.launch(share=True)