Spaces:
Sleeping
Sleeping
Fix page3: remove Code component, add queue()
Browse files21 unmodified lines2223242526272837 unmodified lines666768697021 unmodified lineswith gr.Column(visible=False) as page3:gr.Markdown("# 馃捇 注诪讜讚 讛讗转讙专")gr.Markdown("讻讗谉 转拽讘诇 讗转 讛拽讜讚 讛诪拽讜诇拽诇")code_area = gr.Code(value="# Your buggy code here\nprint('Hello')", language="python")btn3 = gr.Button("砖诇讞 鉃★笍", variant="primary", size="lg")# Page 4: Results37 unmodified linesbtn2.click(fn=switch_to_challenge, inputs=[], outputs=[page1, page2, page3, page4])btn3.click(fn=switch_to_results, inputs=[], outputs=[page1, page2, page3, page4])if __name__ == "__main__":demo.launch(share=False, inbrowser=True)21 unmodified lines222324252627282937 unmodified lines676869707172737421 unmodified lineswith gr.Column(visible=False) as page3:gr.Markdown("# 馃捇 注诪讜讚 讛讗转讙专")gr.Markdown("讻讗谉 转拽讘诇 讗转 讛拽讜讚 讛诪拽讜诇拽诇")gr.Markdown("```python\n# Your buggy code here\nprint('Hello')\n```")gr.Textbox(label="注专讜讱 讗转 讛拽讜讚 讻讗谉", lines=10, value="# Fix the bugs here\nprint('Hello')")btn3 = gr.Button("砖诇讞 鉃★笍", variant="primary", size="lg")# Page 4: Results37 unmodified linesbtn2.click(fn=switch_to_challenge, inputs=[], outputs=[page1, page2, page3, page4])btn3.click(fn=switch_to_results, inputs=[], outputs=[page1, page2, page3, page4])# Enable queue for server compatibilitydemo.queue()if __name__ == "__main__":demo.launch(share=False, inbrowser=True)
minimal_test.py+5-1