Spaces:
Runtime error
Runtime error
Update app.py
Browse files48 unmodified lines495051525354555641 unmodified lines98991009910110210310494 unmodified lines19920020120020220320420520648 unmodified linesdef history_render(history: History): return gr.update(open=True), history
def clear_history(): return []
def send_to_sandbox(code): encoded_html = base64.b64encode(code.encode('utf-8')).decode('utf-8')41 unmodified lines # size="large", allow_clear=True, show_count=True, placeholder="请输入您想要一个什么样的应用") input = gr.TextArea(placeholder="Please enter what kind of application you want", show_label=False, container=False) btn = antd.Button("send", type="primary", size="large")
clear_btn = antd.Button("clear history", type="default", size="large") antd.Divider("examples") with antd.Flex(gap="small", wrap=True): with ms.Each(DEMO_LIST):94 unmodified lines btn.click(generation_code, inputs=[input, setting, history], outputs=[code_output, history, sandbox, state_tab, code_drawer])
clear_btn.click(clear_history, inputs=[], outputs=[history]) if __name__ == "__main__": demo.queue(default_concurrency_limit=20).launch(ssr_mode=False)app.py+6-2