Spaces:
Sleeping
Sleeping
core function 隐藏功能
Browse files- core_functional.py +1 -0
- main.py +2 -0
- request_llm/moss +1 -0
core_functional.py
CHANGED
@@ -73,5 +73,6 @@ def get_core_functions():
|
|
73 |
r"Note that, reference styles maybe more than one kind, you should transform each item correctly." +
|
74 |
r"Items need to be transformed:",
|
75 |
"Suffix": r"",
|
|
|
76 |
}
|
77 |
}
|
|
|
73 |
r"Note that, reference styles maybe more than one kind, you should transform each item correctly." +
|
74 |
r"Items need to be transformed:",
|
75 |
"Suffix": r"",
|
76 |
+
"Visible": False,
|
77 |
}
|
78 |
}
|
main.py
CHANGED
@@ -74,6 +74,7 @@ def main():
|
|
74 |
with gr.Accordion("基础功能区", open=True) as area_basic_fn:
|
75 |
with gr.Row():
|
76 |
for k in functional:
|
|
|
77 |
variant = functional[k]["Color"] if "Color" in functional[k] else "secondary"
|
78 |
functional[k]["Button"] = gr.Button(k, variant=variant)
|
79 |
with gr.Accordion("函数插件区", open=True) as area_crazy_fn:
|
@@ -144,6 +145,7 @@ def main():
|
|
144 |
clearBtn2.click(lambda: ("",""), None, [txt, txt2])
|
145 |
# 基础功能区的回调函数注册
|
146 |
for k in functional:
|
|
|
147 |
click_handle = functional[k]["Button"].click(fn=ArgsGeneralWrapper(predict), inputs=[*input_combo, gr.State(True), gr.State(k)], outputs=output_combo)
|
148 |
cancel_handles.append(click_handle)
|
149 |
# 文件上传区,接收文件后与chatbot的互动
|
|
|
74 |
with gr.Accordion("基础功能区", open=True) as area_basic_fn:
|
75 |
with gr.Row():
|
76 |
for k in functional:
|
77 |
+
if ("Visible" in functional[k]) and (not functional[k]["Visible"]): continue
|
78 |
variant = functional[k]["Color"] if "Color" in functional[k] else "secondary"
|
79 |
functional[k]["Button"] = gr.Button(k, variant=variant)
|
80 |
with gr.Accordion("函数插件区", open=True) as area_crazy_fn:
|
|
|
145 |
clearBtn2.click(lambda: ("",""), None, [txt, txt2])
|
146 |
# 基础功能区的回调函数注册
|
147 |
for k in functional:
|
148 |
+
if ("Visible" in functional[k]) and (not functional[k]["Visible"]): continue
|
149 |
click_handle = functional[k]["Button"].click(fn=ArgsGeneralWrapper(predict), inputs=[*input_combo, gr.State(True), gr.State(k)], outputs=output_combo)
|
150 |
cancel_handles.append(click_handle)
|
151 |
# 文件上传区,接收文件后与chatbot的互动
|
request_llm/moss
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Subproject commit 4d905bcead53739d4395b145cae2be308b1df795
|