Futuretop commited on
Commit
1805eb6
·
verified ·
1 Parent(s): ed07136

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -22,12 +22,11 @@ def caricature_from_photo(image):
22
  raw_image = image.convert('RGB')
23
  inputs = blip_processor(raw_image, return_tensors="pt").to(device)
24
  out = blip_model.generate(**inputs, max_new_tokens=30)
25
- description = blip_processor.decode(out[0], skip_special_tokens=True)
26
 
27
  # 캐리커쳐 스타일 프롬프트 (이모티콘과 직관적 키워드로 꾸밈)
28
  caricature_prompt = (
29
- f"{description}, normal hands, no action, similar image as possible, lovely mood, same posture, five fingers, cute cartoon, gentle lines, charming and lovely, digital illustration, "
30
- "cheerful, simple background, joy, cartoon-style, 😄✨"
31
  )
32
 
33
  # turbo SD: 매우 빠른 생성!
 
22
  raw_image = image.convert('RGB')
23
  inputs = blip_processor(raw_image, return_tensors="pt").to(device)
24
  out = blip_model.generate(**inputs, max_new_tokens=30)
25
+ description = blip_processor.decode(out[0], skip_special_tokens=False)
26
 
27
  # 캐리커쳐 스타일 프롬프트 (이모티콘과 직관적 키워드로 꾸밈)
28
  caricature_prompt = (
29
+ f"{description}, gentle lines, charming and lovely, sweet expression, cheerful, white background, joy, cartoon-style, caricature"
 
30
  )
31
 
32
  # turbo SD: 매우 빠른 생성!