aiqcamp commited on
Commit
faf1c18
·
verified ·
1 Parent(s): 48a59a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -60,12 +60,15 @@ florence_processors = {
60
 
61
  def filter_prompt(prompt):
62
  inappropriate_keywords = [
63
- "nude", "naked", "nsfw", "porn", "sex", "explicit", "adult", "xxx",
64
- "erotic", "sensual", "seductive", "provocative", "intimate",
65
- "violence", "gore", "blood", "death", "kill", "murder", "torture",
66
- "drug", "suicide", "abuse", "hate", "discrimination"
67
  ]
68
 
 
 
 
 
 
 
69
  prompt_lower = prompt.lower()
70
 
71
  for keyword in inappropriate_keywords:
@@ -318,8 +321,8 @@ hr {
318
  """
319
 
320
  with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
321
- gr.HTML('<div class="title">AI Image Generator & Caption</div>')
322
- gr.HTML('<div style="text-align: center; margin-bottom: 2em;">Upload an image for caption or create from text description</div>')
323
 
324
  with gr.Row():
325
  # 왼쪽 컬럼: 입력 섹션
 
60
 
61
  def filter_prompt(prompt):
62
  inappropriate_keywords = [
63
+ "sex"
 
 
 
64
  ]
65
 
66
+ # "nude", "naked", "nsfw", "porn", "sex", "explicit", "adult", "xxx",
67
+ # "erotic", "sensual", "seductive", "provocative", "intimate",
68
+ # "violence", "gore", "blood", "death", "kill", "murder", "torture",
69
+ # "drug", "suicide", "abuse", "hate", "discrimination"
70
+ # ]
71
+
72
  prompt_lower = prompt.lower()
73
 
74
  for keyword in inappropriate_keywords:
 
321
  """
322
 
323
  with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
324
+ gr.HTML('<div class="title"> VisionReply</div>')
325
+ gr.HTML('<div style="text-align: center; margin-bottom: 2em;">Upload an image(Image2Text2Image)</div>')
326
 
327
  with gr.Row():
328
  # 왼쪽 컬럼: 입력 섹션