Spaces:
Sleeping
Sleeping
return admin, reading_passage_admin, summary_admin, see_detail, password_text, youtube_link
Browse files
app.py
CHANGED
@@ -1500,6 +1500,8 @@ def init_params(text, request: gr.Request):
|
|
1500 |
password_text = ""
|
1501 |
admin = gr.update(visible=True)
|
1502 |
reading_passage_admin = gr.update(visible=True)
|
|
|
|
|
1503 |
|
1504 |
# if youtube_link in query_params
|
1505 |
if "youtube_id" in request.query_params:
|
@@ -1513,8 +1515,10 @@ def init_params(text, request: gr.Request):
|
|
1513 |
password_text = "6161"
|
1514 |
admin = gr.update(visible=False)
|
1515 |
reading_passage_admin = gr.update(visible=False)
|
|
|
|
|
1516 |
|
1517 |
-
return admin, reading_passage_admin, password_text, youtube_link
|
1518 |
|
1519 |
HEAD = """
|
1520 |
<meta charset="UTF-8">
|
@@ -1697,7 +1701,7 @@ with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.orange, seconda
|
|
1697 |
# metacognition_content = gr.Textbox(label="輸入後設認知相關問題")
|
1698 |
# metacognition_content_btn = gr.Button("生成後設認知問題")
|
1699 |
|
1700 |
-
with gr.Accordion("See Details", open=False):
|
1701 |
with gr.Tab("本文"):
|
1702 |
df_string_output = gr.Textbox(lines=40, label="Data Text")
|
1703 |
with gr.Tab("逐字稿"):
|
@@ -1929,7 +1933,7 @@ with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.orange, seconda
|
|
1929 |
demo.load(
|
1930 |
init_params,
|
1931 |
inputs =[youtube_link],
|
1932 |
-
outputs = [admin, reading_passage_admin, password , youtube_link]
|
1933 |
)
|
1934 |
|
1935 |
demo.launch(allowed_paths=["videos"])
|
|
|
1500 |
password_text = ""
|
1501 |
admin = gr.update(visible=True)
|
1502 |
reading_passage_admin = gr.update(visible=True)
|
1503 |
+
summary_admin = gr.update(visible=True)
|
1504 |
+
see_detail = gr.update(visible=True)
|
1505 |
|
1506 |
# if youtube_link in query_params
|
1507 |
if "youtube_id" in request.query_params:
|
|
|
1515 |
password_text = "6161"
|
1516 |
admin = gr.update(visible=False)
|
1517 |
reading_passage_admin = gr.update(visible=False)
|
1518 |
+
summary_admin = gr.update(visible=False)
|
1519 |
+
see_detail = gr.update(visible=False)
|
1520 |
|
1521 |
+
return admin, reading_passage_admin, summary_admin, see_detail, password_text, youtube_link
|
1522 |
|
1523 |
HEAD = """
|
1524 |
<meta charset="UTF-8">
|
|
|
1701 |
# metacognition_content = gr.Textbox(label="輸入後設認知相關問題")
|
1702 |
# metacognition_content_btn = gr.Button("生成後設認知問題")
|
1703 |
|
1704 |
+
with gr.Accordion("See Details", open=False) as see_details:
|
1705 |
with gr.Tab("本文"):
|
1706 |
df_string_output = gr.Textbox(lines=40, label="Data Text")
|
1707 |
with gr.Tab("逐字稿"):
|
|
|
1933 |
demo.load(
|
1934 |
init_params,
|
1935 |
inputs =[youtube_link],
|
1936 |
+
outputs = [admin, reading_passage_admin, summary_admmin, see_details, password , youtube_link]
|
1937 |
)
|
1938 |
|
1939 |
demo.launch(allowed_paths=["videos"])
|