zdxpan commited on
Commit
2133c24
1 Parent(s): dcc1b71

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -351,9 +351,6 @@ with gr.Blocks() as demo:
351
  txt_x = gr.Slider(1, WIDTH, label = "内容位置_x", value=20, step = 5)
352
  color3 = gr.Textbox("#101010", label = "文字颜色")
353
 
354
- input_image, font_title, sz1, title_x, title_y, color1, \
355
- font_subtt, sz2, subtt_x, subtt_y, color2, \
356
- font_txt, sz3, txt_x, color3, bac_color = load_template("专有")
357
  with gr.Row():
358
  with gr.Column(): # ----按钮控件------
359
  pre_img_bt = gr.Button("预览")
@@ -401,7 +398,6 @@ with gr.Blocks() as demo:
401
  with gr.TabItem("todo内嵌浏览器pyqt html"):
402
  mp = gr.HTML(html, elem_id="coords", visible=True)
403
  pass
404
-
405
  pre_img_bt.click(fn=generate_image, inputs=[input_image, title,a,b,c,d,e,f,
406
  font_title, sz1, title_x, title_y, color1,
407
  font_subtt, sz2, subtt_x, subtt_y, color2,
@@ -431,6 +427,10 @@ with gr.Blocks() as demo:
431
  # 绑定clear点击函数
432
  # clear.click(fn=clear_input, inputs=[], outputs=[context, question, answer, score])
433
 
 
 
 
 
434
  if __name__ == "__main__":
435
  demo.queue().launch()
436
  print("run from current ")
 
351
  txt_x = gr.Slider(1, WIDTH, label = "内容位置_x", value=20, step = 5)
352
  color3 = gr.Textbox("#101010", label = "文字颜色")
353
 
 
 
 
354
  with gr.Row():
355
  with gr.Column(): # ----按钮控件------
356
  pre_img_bt = gr.Button("预览")
 
398
  with gr.TabItem("todo内嵌浏览器pyqt html"):
399
  mp = gr.HTML(html, elem_id="coords", visible=True)
400
  pass
 
401
  pre_img_bt.click(fn=generate_image, inputs=[input_image, title,a,b,c,d,e,f,
402
  font_title, sz1, title_x, title_y, color1,
403
  font_subtt, sz2, subtt_x, subtt_y, color2,
 
427
  # 绑定clear点击函数
428
  # clear.click(fn=clear_input, inputs=[], outputs=[context, question, answer, score])
429
 
430
+ input_image, font_title, sz1, title_x, title_y, color1, \
431
+ font_subtt, sz2, subtt_x, subtt_y, color2, \
432
+ font_txt, sz3, txt_x, color3, bac_color = load_template("专有")
433
+
434
  if __name__ == "__main__":
435
  demo.queue().launch()
436
  print("run from current ")