Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -404,22 +404,21 @@ with gr.Blocks(title="ν€μλ κΈ°λ° μ°½μμ λ³ν μμ΄λμ΄ μμ±κΈ°",
|
|
404 |
text_input3 = gr.Textbox(label="ν€μλ 3 (μ ν)", placeholder="μ: ν¬μ€μΌμ΄")
|
405 |
|
406 |
# μ
λ ₯κ³Ό λ²νΌ μ¬μ΄μ μν λ©μμ§λ₯Ό νμν μμ μΆκ°
|
407 |
-
status_msg = gr.Markdown("π‘ 'μμ΄λμ΄ μμ±νκΈ°' λ²νΌμ ν΄λ¦νλ©΄
|
408 |
|
409 |
# μ²λ¦¬ μ€μΌ λλ§ νμλλ μν λ©μμ§
|
410 |
-
|
411 |
-
|
412 |
-
<div style="
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
""")
|
423 |
|
424 |
submit_button = gr.Button("μμ΄λμ΄ μμ±νκΈ°", variant="primary")
|
425 |
|
@@ -430,12 +429,10 @@ with gr.Blocks(title="ν€μλ κΈ°λ° μ°½μμ λ³ν μμ΄λμ΄ μμ±κΈ°",
|
|
430 |
# μμ μ
λ ₯
|
431 |
gr.Examples(
|
432 |
examples=[
|
433 |
-
|
434 |
-
["
|
435 |
-
["
|
436 |
-
["λλ‘ ", "μΈκ³΅μ§λ₯", ""],
|
437 |
["μ΄λν", "μ¨μ΄λ¬λΈ", "건κ°"],
|
438 |
-
|
439 |
],
|
440 |
inputs=[text_input1, text_input2, text_input3],
|
441 |
)
|
@@ -452,7 +449,7 @@ with gr.Blocks(title="ν€μλ κΈ°λ° μ°½μμ λ³ν μμ΄λμ΄ μμ±κΈ°",
|
|
452 |
submit_button.click(
|
453 |
fn=show_processing_indicator,
|
454 |
inputs=None,
|
455 |
-
outputs=
|
456 |
).then(
|
457 |
fn=process_inputs,
|
458 |
inputs=[text_input1, text_input2, text_input3],
|
@@ -460,7 +457,7 @@ with gr.Blocks(title="ν€μλ κΈ°λ° μ°½μμ λ³ν μμ΄λμ΄ μμ±κΈ°",
|
|
460 |
).then(
|
461 |
fn=hide_processing_indicator,
|
462 |
inputs=None,
|
463 |
-
outputs=
|
464 |
)
|
465 |
|
466 |
if __name__ == "__main__":
|
|
|
404 |
text_input3 = gr.Textbox(label="ν€μλ 3 (μ ν)", placeholder="μ: ν¬μ€μΌμ΄")
|
405 |
|
406 |
# μ
λ ₯κ³Ό λ²νΌ μ¬μ΄μ μν λ©μμ§λ₯Ό νμν μμ μΆκ°
|
407 |
+
status_msg = gr.Markdown("π‘ 'μμ΄λμ΄ μμ±νκΈ°' λ²νΌμ ν΄λ¦νλ©΄ μμ΄λμ΄ μμ±μ΄ μμλ©λλ€.")
|
408 |
|
409 |
# μ²λ¦¬ μ€μΌ λλ§ νμλλ μν λ©μμ§
|
410 |
+
processing_indicator = gr.HTML("""
|
411 |
+
<div style="display: flex; justify-content: center; align-items: center; margin: 10px 0;">
|
412 |
+
<div style="border: 5px solid #f3f3f3; border-top: 5px solid #3498db; border-radius: 50%; width: 30px; height: 30px; animation: spin 2s linear infinite;"></div>
|
413 |
+
<p style="margin-left: 10px; font-weight: bold; color: #3498db;">μ²λ¦¬ μ€μ
λλ€...</p>
|
414 |
+
</div>
|
415 |
+
<style>
|
416 |
+
@keyframes spin {
|
417 |
+
0% { transform: rotate(0deg); }
|
418 |
+
100% { transform: rotate(360deg); }
|
419 |
+
}
|
420 |
+
</style>
|
421 |
+
""", visible=False)
|
|
|
422 |
|
423 |
submit_button = gr.Button("μμ΄λμ΄ μμ±νκΈ°", variant="primary")
|
424 |
|
|
|
429 |
# μμ μ
λ ₯
|
430 |
gr.Examples(
|
431 |
examples=[
|
432 |
+
["μ€λ§νΈν°", "", ""],
|
433 |
+
["컀νΌ", "μ±
", ""],
|
434 |
+
["μλμ°¨", "λ‘λ΄", "μΈκ³΅μ§λ₯"],
|
|
|
435 |
["μ΄λν", "μ¨μ΄λ¬λΈ", "건κ°"],
|
|
|
436 |
],
|
437 |
inputs=[text_input1, text_input2, text_input3],
|
438 |
)
|
|
|
449 |
submit_button.click(
|
450 |
fn=show_processing_indicator,
|
451 |
inputs=None,
|
452 |
+
outputs=processing_indicator
|
453 |
).then(
|
454 |
fn=process_inputs,
|
455 |
inputs=[text_input1, text_input2, text_input3],
|
|
|
457 |
).then(
|
458 |
fn=hide_processing_indicator,
|
459 |
inputs=None,
|
460 |
+
outputs=processing_indicator
|
461 |
)
|
462 |
|
463 |
if __name__ == "__main__":
|