Spaces:
Running
Running
Update app.py
Browse files130 unmodified lines13113213313413513613747 unmodified lines1851861871881891901913 unmodified lines195196197198199200130 unmodified lineswith open(dict_path, "w", encoding="utf-8") as f:json.dump(j_struct, f, ensure_ascii=False, indent=2)# β μλ‘ μΆκ°λ λΆμΌμΉ κ²½κ³ λ‘μ§ βif current_input and word not in current_input:status_msg = f"β οΈ μ¬μ μ μ₯ μλ£! νμ§λ§ μλ³Έ ν μ€νΈμ '{word}'(μ΄)κ° μμ΄ νλ©΄μ λ³νκ° μμ΅λλ€. (1λ² μ°½μμ κ·Έλλ‘ λ³΅μ¬ν΄μ€μΈμ!)"else:47 unmodified lineswith gr.Row():nw = gr.Textbox(label="κΈ°μ‘΄ λ¨μ΄ λλ λ¬Έμ₯ (β λ°λμ 1λ² μ°½μμ 볡μ¬ν΄μ€μΈμβ )")np = gr.Textbox(label="μνλ λ°μ")btn_add = gr.Button("πΎ μ¬μ μ μΆκ°νκ³ μ¦μ λλ³Έ λ³ννκΈ°", variant="primary")status = gr.Textbox(label="μ μ₯ μν κ²°κ³Όμ°½", interactive=False)3 unmodified linesoutputs=[status, output_text, output_html, char_count],api_name=False)with gr.Tab("π₯ μλ λ°±μ /볡ꡬ"):dl_btn = gr.DownloadButton("π₯ 1. νμ¬ μμ±λ μ¬μ λ°±μ νκΈ° (PC λ€μ΄λ‘λ)")130 unmodified lines13113213313413513647 unmodified lines1841851861871881891901911921931943 unmodified lines198199200201202203204205206207208209210130 unmodified lineswith open(dict_path, "w", encoding="utf-8") as f:json.dump(j_struct, f, ensure_ascii=False, indent=2)if current_input and word not in current_input:status_msg = f"β οΈ μ¬μ μ μ₯ μλ£! νμ§λ§ μλ³Έ ν μ€νΈμ '{word}'(μ΄)κ° μμ΄ νλ©΄μ λ³νκ° μμ΅λλ€. (1λ² μ°½μμ κ·Έλλ‘ λ³΅μ¬ν΄μ€μΈμ!)"else:47 unmodified lineswith gr.Row():nw = gr.Textbox(label="κΈ°μ‘΄ λ¨μ΄ λλ λ¬Έμ₯ (β λ°λμ 1λ² μ°½μμ 볡μ¬ν΄μ€μΈμβ )")np = gr.Textbox(label="μνλ λ°μ")# λ²νΌ λ κ°λ₯Ό μμλλ‘ κΉλνκ² λ°°μΉwith gr.Column(min_width=200):btn_add = gr.Button("πΎ μ¬μ μ μΆκ°νκ³ μ¦μ λλ³Έ λ³ννκΈ°", variant="primary")btn_clear_dict_inputs = gr.Button("π§Ή λ¨μ΄ μ λ ₯μΉΈ λΉμ°κΈ°", variant="secondary")status = gr.Textbox(label="μ μ₯ μν κ²°κ³Όμ°½", interactive=False)3 unmodified linesoutputs=[status, output_text, output_html, char_count],api_name=False)# β μλ‘ μΆκ°λ λμ: μ€μ§ λ¨μ΄ μ λ ₯μΉΈ 2κ°λ§ κΉλνκ² λΉμμ€! βbtn_clear_dict_inputs.click(fn=lambda: ("", ""),outputs=[nw, np],api_name=False)with gr.Tab("π₯ μλ λ°±μ /볡ꡬ"):dl_btn = gr.DownloadButton("π₯ 1. νμ¬ μμ±λ μ¬μ λ°±μ νκΈ° (PC λ€μ΄λ‘λ)")
app.py+12-2