Spaces:
Runtime error
Runtime error
Update app.py
Browse files48 unmodified lines49505152535441 unmodified lines9697989910010110294 unmodified lines19719819920020120248 unmodified linesdef history_render(history: History):return gr.update(open=True), historydef 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")antd.Divider("examples")with antd.Flex(gap="small", wrap=True):with ms.Each(DEMO_LIST):94 unmodified linesbtn.click(generation_code,inputs=[input, setting, history],outputs=[code_output, history, sandbox, state_tab, code_drawer])if __name__ == "__main__":demo.queue(default_concurrency_limit=20).launch(ssr_mode=False)48 unmodified lines495051525354555641 unmodified lines989910010110210310494 unmodified lines19920020120220320420520648 unmodified linesdef history_render(history: History):return gr.update(open=True), historydef 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 linesbtn.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