tori29umai commited on
Commit
60fbee5
·
verified ·
1 Parent(s): f071260

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -2
app.py CHANGED
@@ -149,6 +149,17 @@ def generate_turnaround(
149
  css = """
150
  #col-container {margin: 0 auto; max-width: 1400px;}
151
  .image-container img {object-fit: contain !important; max-width: 100%; max-height: 100%;}
 
 
 
 
 
 
 
 
 
 
 
152
  """
153
 
154
  with gr.Blocks(css=css) as demo:
@@ -156,8 +167,18 @@ with gr.Blocks(css=css) as demo:
156
  gr.Markdown("アップロードしたキャラクター画像から正面・背面・左右側面、さらに4枚連結のPNG画像を出力します。")
157
 
158
  with gr.Column(elem_id="col-container"):
 
 
 
 
 
 
 
 
 
159
  input_image = gr.Image(label="入力画像", type="pil", height=500)
160
- # ← 追加: 追記プロンプト欄
 
161
  extra_prompt = gr.Textbox(
162
  label="追加プロンプト(各視点プロンプトの末尾に追記)",
163
  placeholder="例: high detail, anime style, soft lighting, 4k, pastel colors",
@@ -183,7 +204,6 @@ with gr.Blocks(css=css) as demo:
183
  true_guidance_scale = gr.Slider(label="True guidance scale", minimum=1.0, maximum=10.0, step=0.1, value=1.0)
184
  num_inference_steps = gr.Slider(label="生成ステップ数", minimum=1, maximum=40, step=1, value=4)
185
 
186
- # 入力の並びに extra_prompt を追加
187
  run_button.click(
188
  fn=generate_turnaround,
189
  inputs=[input_image, extra_prompt, seed, randomize_seed, true_guidance_scale, num_inference_steps],
 
149
  css = """
150
  #col-container {margin: 0 auto; max-width: 1400px;}
151
  .image-container img {object-fit: contain !important; max-width: 100%; max-height: 100%;}
152
+ /* 追加: 注意ボックスのスタイル */
153
+ .notice {
154
+ background: #fff5f5;
155
+ border: 1px solid #fca5a5;
156
+ color: #7f1d1d;
157
+ padding: 12px 14px;
158
+ border-radius: 10px;
159
+ font-weight: 600;
160
+ line-height: 1.5;
161
+ margin-bottom: 10px;
162
+ }
163
  """
164
 
165
  with gr.Blocks(css=css) as demo:
 
167
  gr.Markdown("アップロードしたキャラクター画像から正面・背面・左右側面、さらに4枚連結のPNG画像を出力します。")
168
 
169
  with gr.Column(elem_id="col-container"):
170
+ # 追加: 注意文(アップロード欄の直前に表示)
171
+ gr.HTML(
172
+ "<div class='notice'>"
173
+ "注意:他者が作成した画像のアップロードはご遠慮ください。"
174
+ "他人の著作物・肖像権を侵害する恐れがあります。"
175
+ "当アプリ作成者は、アップロード内容による権利侵害について一切の責任を負いません。"
176
+ "</div>"
177
+ )
178
+
179
  input_image = gr.Image(label="入力画像", type="pil", height=500)
180
+
181
+ # 追記プロンプト欄
182
  extra_prompt = gr.Textbox(
183
  label="追加プロンプト(各視点プロンプトの末尾に追記)",
184
  placeholder="例: high detail, anime style, soft lighting, 4k, pastel colors",
 
204
  true_guidance_scale = gr.Slider(label="True guidance scale", minimum=1.0, maximum=10.0, step=0.1, value=1.0)
205
  num_inference_steps = gr.Slider(label="生成ステップ数", minimum=1, maximum=40, step=1, value=4)
206
 
 
207
  run_button.click(
208
  fn=generate_turnaround,
209
  inputs=[input_image, extra_prompt, seed, randomize_seed, true_guidance_scale, num_inference_steps],