lucianosb commited on
Commit
96cfe2d
·
verified ·
1 Parent(s): 9c50a58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -89,7 +89,9 @@ def genderplot(genlist):
89
  def age_detector(image):
90
  pipe = pipeline('image-classification', model="dima806/faces_age_detection", device=0)
91
  result = pipe(image)
 
92
  filtered_labels = [item['label'] for item in result if item['score'] > 0.85]
 
93
  return filtered_labels
94
 
95
  def ageplot(agelist):
@@ -150,9 +152,7 @@ def generate_images_plots(prompt, model_name):
150
  prompt_prefix = "photo of a "
151
  caption = blip_caption_image(image, prefix=prompt_prefix)
152
  age = age_detector(image)
153
- print(age)
154
  nsfw = is_nsfw(image)
155
- print(nsfw)
156
  image.save(f"{foldername}/image_{i}.png")
157
  try:
158
  skintoneres = stone.process(f"{foldername}/image_{i}.png", return_report_image=False)
 
89
  def age_detector(image):
90
  pipe = pipeline('image-classification', model="dima806/faces_age_detection", device=0)
91
  result = pipe(image)
92
+ print(result)
93
  filtered_labels = [item['label'] for item in result if item['score'] > 0.85]
94
+ print(filtered_labels)
95
  return filtered_labels
96
 
97
  def ageplot(agelist):
 
152
  prompt_prefix = "photo of a "
153
  caption = blip_caption_image(image, prefix=prompt_prefix)
154
  age = age_detector(image)
 
155
  nsfw = is_nsfw(image)
 
156
  image.save(f"{foldername}/image_{i}.png")
157
  try:
158
  skintoneres = stone.process(f"{foldername}/image_{i}.png", return_report_image=False)