ginipick commited on
Commit
31ab3f5
1 Parent(s): 138df83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +56 -0
app.py CHANGED
@@ -840,8 +840,64 @@ footer {
840
  }
841
  """
842
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
843
  def create_demo():
844
  with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css) as demo:
 
845
  gr.Markdown("# FLUXllama Multilingual v3")
846
 
847
  with gr.Row():
 
840
  }
841
  """
842
 
843
+ def create_snow_effect():
844
+ # CSS 스타일 정의
845
+ snow_css = """
846
+ @keyframes snowfall {
847
+ 0% {
848
+ transform: translateY(-10vh) translateX(0);
849
+ opacity: 1;
850
+ }
851
+ 100% {
852
+ transform: translateY(100vh) translateX(100px);
853
+ opacity: 0.3;
854
+ }
855
+ }
856
+ .snowflake {
857
+ position: fixed;
858
+ color: white;
859
+ font-size: 1.5em;
860
+ user-select: none;
861
+ z-index: 1000;
862
+ pointer-events: none;
863
+ animation: snowfall linear infinite;
864
+ }
865
+ """
866
+
867
+ # JavaScript 코드 정의
868
+ snow_js = """
869
+ function createSnowflake() {
870
+ const snowflake = document.createElement('div');
871
+ snowflake.innerHTML = '❄';
872
+ snowflake.className = 'snowflake';
873
+ snowflake.style.left = Math.random() * 100 + 'vw';
874
+ snowflake.style.animationDuration = Math.random() * 3 + 2 + 's';
875
+ snowflake.style.opacity = Math.random();
876
+ document.body.appendChild(snowflake);
877
+
878
+ setTimeout(() => {
879
+ snowflake.remove();
880
+ }, 5000);
881
+ }
882
+ setInterval(createSnowflake, 200);
883
+ """
884
+
885
+ # CSS와 JavaScript를 결합한 HTML
886
+ snow_html = f"""
887
+ <style>
888
+ {snow_css}
889
+ </style>
890
+ <script>
891
+ {snow_js}
892
+ </script>
893
+ """
894
+
895
+ return gr.HTML(snow_html)
896
+
897
+
898
  def create_demo():
899
  with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css) as demo:
900
+ create_snow_effect()
901
  gr.Markdown("# FLUXllama Multilingual v3")
902
 
903
  with gr.Row():