import gradio as gr def create_idiom_game(): # 建立 Gradio 介面 with gr.Blocks() as demo: gr.Markdown("# 成語對對碰") # 嵌入 HTML 和 JavaScript gr.HTML("""
""") return demo if __name__ == "__main__": demo = create_idiom_game() demo.launch()