This commit is contained in:
w_xiaolizu
2023-04-23 09:41:38 +08:00
parent 114fc12ffe
commit 3f4e4ba261

View File

@ -111,6 +111,8 @@ class ChatBot(ChatBotFrame):
with gr.Row():
self.upload_history = gr.Button("Get Upload History", variant="secondary")
self.get_download = gr.Button('Get Download Link', variant='stop')
self.upload_history.style(size='sm')
self.get_download.style(size='sm')
with gr.Accordion("函数插件区", open=True) as self.area_crazy_fn:
with gr.Row():
for k in crazy_fns:
@ -139,17 +141,15 @@ class ChatBot(ChatBotFrame):
gr.Markdown(self.description)
def draw_goals_auto(self):
with gr.Box():
with gr.Row():
self.ai_name = gr.Textbox(show_label=False, placeholder="Give AI a name.").style(container=False)
with gr.Row():
self.user_input = gr.Textbox(lines=5, show_label=False, placeholder="Describe your AI's role.").style(container=False)
with gr.Box():
with gr.Row() as self.goal_list:
self.goal_array = []
for text in range(4):
self.goal_array.append(gr.Textbox(show_label=False, placeholder="Enter up to 1 goals.").style(container=False))
with gr.Row():
self.submit_add = gr.Button("Adding goals", variant="secondary")
self.goal_list = gr.Dataframe(label='Adding goals', headers=['Goals'], interactive=True,
row_count=4, col_count=(1, 'fixed'), type='array')
self.goal_list.style()
with gr.Row():
__l = [str(i) for i in range(10, 101, 10)]
__l.insert(0, '1')