jy-raychen commited on
Commit
b044e50
1 Parent(s): 7c56974

show load ready flag

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -5,9 +5,9 @@ import gradio as gr
5
  def init_params(text, request: gr.Request):
6
  youtube_link = ""
7
  password_text = ""
8
- load_ready_flag = "READY"
9
  admin = gr.update(visible=True)
10
- return admin, password_text, youtube_link, load_ready_flag
11
 
12
  HEAD = """
13
  <meta charset="UTF-8">
@@ -43,7 +43,7 @@ with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.orange, seconda
43
  # file_upload = gr.File(label="Upload your CSV or Word file", visible=False)
44
  # web_link = gr.Textbox(label="Enter Web Page Link", visible=False)
45
  user_data = gr.Textbox(label="User Data", elem_id="user_data_input", visible=True)
46
- load_ready_flag = gr.Textbox(label="load_ready_flag", elem_id="load_ready_flag", value="LOADING", visible=False)
47
  youtube_link_btn = gr.Button("Submit_YouTube_Link", elem_id="youtube_link_btn", visible=True)
48
  with gr.Row() as data_state:
49
  content_subject_state = gr.State() # 使用 gr.State 存储 content_subject
@@ -54,7 +54,7 @@ with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.orange, seconda
54
  admin,
55
  password,
56
  youtube_link,
57
- load_ready_flag,
58
  ]
59
  demo.load(
60
  init_params,
 
5
  def init_params(text, request: gr.Request):
6
  youtube_link = ""
7
  password_text = ""
8
+ block_ready_flag = "READY"
9
  admin = gr.update(visible=True)
10
+ return admin, password_text, youtube_link, block_ready_flag
11
 
12
  HEAD = """
13
  <meta charset="UTF-8">
 
43
  # file_upload = gr.File(label="Upload your CSV or Word file", visible=False)
44
  # web_link = gr.Textbox(label="Enter Web Page Link", visible=False)
45
  user_data = gr.Textbox(label="User Data", elem_id="user_data_input", visible=True)
46
+ block_ready_flag = gr.Textbox(label="load_ready_flag", elem_id="block_ready_flag", value="LOADING", visible=True)
47
  youtube_link_btn = gr.Button("Submit_YouTube_Link", elem_id="youtube_link_btn", visible=True)
48
  with gr.Row() as data_state:
49
  content_subject_state = gr.State() # 使用 gr.State 存储 content_subject
 
54
  admin,
55
  password,
56
  youtube_link,
57
+ block_ready_flag,
58
  ]
59
  demo.load(
60
  init_params,