Update app.py
Browse files
app.py
CHANGED
@@ -332,26 +332,26 @@ with gr.Blocks() as demo:
|
|
332 |
# movie_file = gr.Video(exam_video,label="movie")
|
333 |
with gr.Column():
|
334 |
# -- 输入背景图底图 作为画布 --
|
335 |
-
input_image = gr.Image(
|
336 |
-
title_x = gr.Slider(1, WIDTH, label = "标题左右移动", value=
|
337 |
-
title_y = gr.Slider(1, HEIGHT, label = "标题上下移动", value=
|
338 |
font_title = gr.Dropdown(choices = font_list, label = "标题字体",
|
339 |
-
value =
|
340 |
-
sz1 = gr.Slider(1, 100, label = "标题大小", value=
|
341 |
-
color1 = gr.Textbox(
|
342 |
-
bac_color = gr.Textbox(
|
343 |
|
344 |
with gr.Column():
|
345 |
# -- 子标题
|
346 |
-
font_subtt = gr.Dropdown(choices = font_list, label = "子标题字体", value =
|
347 |
-
sz2 = gr.Slider(1, 100, label = "subTitleSZ", value=
|
348 |
-
subtt_x = gr.Slider(1, WIDTH, label = "子标题左右-->", value=
|
349 |
-
subtt_y = gr.Slider(1, HEIGHT, label = "子标题 上下 ^ v", value=
|
350 |
-
color2 = gr.Textbox(
|
351 |
-
font_txt = gr.Dropdown(choices = font_list, label = "文本字体", value =
|
352 |
-
sz3 = gr.Slider(1, 100, label = "wordSize", value=
|
353 |
-
txt_x = gr.Slider(1, WIDTH, label = "内容位置_x", value=
|
354 |
-
color3 = gr.Textbox(
|
355 |
|
356 |
with gr.Row():
|
357 |
with gr.Column(): # ----按钮控件------
|
|
|
332 |
# movie_file = gr.Video(exam_video,label="movie")
|
333 |
with gr.Column():
|
334 |
# -- 输入背景图底图 作为画布 --
|
335 |
+
input_image = gr.Image(input_image_, label = "背景图, input",interactive=True)
|
336 |
+
title_x = gr.Slider(1, WIDTH, label = "标题左右移动", value=title_x_, step = 5)
|
337 |
+
title_y = gr.Slider(1, HEIGHT, label = "标题上下移动", value=title_y_, step = 5)
|
338 |
font_title = gr.Dropdown(choices = font_list, label = "标题字体",
|
339 |
+
value = font_title_)
|
340 |
+
sz1 = gr.Slider(1, 100, label = "标题大小", value=sz1_, step = 5)
|
341 |
+
color1 = gr.Textbox(color1_, label = "标题颜色")
|
342 |
+
bac_color = gr.Textbox(bac_color_, label = "文本框颜色 空不设置文本框")
|
343 |
|
344 |
with gr.Column():
|
345 |
# -- 子标题
|
346 |
+
font_subtt = gr.Dropdown(choices = font_list, label = "子标题字体", value = font_subtt_)
|
347 |
+
sz2 = gr.Slider(1, 100, label = "subTitleSZ", value=sz2_, step = 5)
|
348 |
+
subtt_x = gr.Slider(1, WIDTH, label = "子标题左右-->", value=subtt_x_, step = 5)
|
349 |
+
subtt_y = gr.Slider(1, HEIGHT, label = "子标题 上下 ^ v", value=subtt_y_, step = 5)
|
350 |
+
color2 = gr.Textbox(color2_, label = "子标题颜色")
|
351 |
+
font_txt = gr.Dropdown(choices = font_list, label = "文本字体", value = font_txt_)
|
352 |
+
sz3 = gr.Slider(1, 100, label = "wordSize", value=sz3_, step = 5)
|
353 |
+
txt_x = gr.Slider(1, WIDTH, label = "内容位置_x", value=txt_x_, step = 5)
|
354 |
+
color3 = gr.Textbox(color3_, label = "文字颜色")
|
355 |
|
356 |
with gr.Row():
|
357 |
with gr.Column(): # ----按钮控件------
|