Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -23,6 +23,10 @@ def generate_caption(image):
23
  output_ids = model.generate(**inputs, max_length=50)
24
  caption = processor.decode(output_ids[0], skip_special_tokens=True)
25
  print("βœ… μƒμ„±λœ μ„€λͺ…:", caption)
 
 
 
 
26
  return caption
27
 
28
  # 4. Gradio μΈν„°νŽ˜μ΄μŠ€ ꡬ성
 
23
  output_ids = model.generate(**inputs, max_length=50)
24
  caption = processor.decode(output_ids[0], skip_special_tokens=True)
25
  print("βœ… μƒμ„±λœ μ„€λͺ…:", caption)
26
+ if "Asian" in caption:
27
+ caption = caption.replace("Asian", "Korean")
28
+ print("βœ… μƒμ„±λœ μ„€λͺ…:", caption)
29
+ return caption
30
  return caption
31
 
32
  # 4. Gradio μΈν„°νŽ˜μ΄μŠ€ ꡬ성