Catmeow commited on
Commit
5943157
β€’
1 Parent(s): 7709e7b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -9
app.py CHANGED
@@ -1,9 +1,4 @@
1
- from doctest import Example
2
- import os
3
- os.system("pip install dlib")
4
- import sys
5
  import face_detection
6
- import PIL
7
  from PIL import Image, ImageOps, ImageFile
8
  import numpy as np
9
  import cv2 as cv
@@ -113,21 +108,22 @@ def generate(img):
113
 
114
 
115
  title = "Face from Photo into paint"
116
- description = "Upload a photo, this Ai will detect and transfer only the face into cartoon/anime painting style. Good for Avatar painting style."
117
  article = "Examples are from Internet"
118
 
119
  Example=[['Example01.jpg'],['Example02.jpg']]
120
 
121
  demo = gr.Interface(
122
  generate,
123
- inputs = [gr.Image(type="pil", label="Upload a photo, Ai will detect main face and paint into cartoon style")],
124
- outputs= [gr.Image(type="pil", label="Output two results from different models")],
125
  title=title,
126
  description=description,
127
  article=article,
128
  examples=Example,
129
  enable_queue=True,
130
- allow_flagging=False
131
  )
132
 
133
  demo.launch()
 
 
 
 
 
 
1
  import face_detection
 
2
  from PIL import Image, ImageOps, ImageFile
3
  import numpy as np
4
  import cv2 as cv
 
108
 
109
 
110
  title = "Face from Photo into paint"
111
+ description = "Upload a photo, this Ai will detect and transfer only the face into cartoon/anime painting style. Good for Avatar painting style. Output will be two results from different models"
112
  article = "Examples are from Internet"
113
 
114
  Example=[['Example01.jpg'],['Example02.jpg']]
115
 
116
  demo = gr.Interface(
117
  generate,
118
+ inputs = [gr.Image(type="pil", label="Upload a photo")],
119
+ outputs= [gr.Image(type="pil", label="Output")],
120
  title=title,
121
  description=description,
122
  article=article,
123
  examples=Example,
124
  enable_queue=True,
125
+ allow_flagging='never'
126
  )
127
 
128
  demo.launch()
129
+