iisadia commited on
Commit
23ba6b1
·
verified ·
1 Parent(s): 4109ca4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -24
app.py CHANGED
@@ -15,30 +15,6 @@ from audio_recorder_streamlit import audio_recorder
15
  from transformers import pipeline
16
 
17
 
18
- def main():
19
- inject_custom_css()
20
-
21
- # Add the cursor-following element
22
- st.markdown("""
23
- <div id="follower" style="
24
- position: absolute;
25
- width: 50px;
26
- height: 50px;
27
- background: url('https://example.com/your-dragon-image.png') no-repeat center center;
28
- background-size: contain;
29
- pointer-events: none;
30
- transition: transform 0.1s;">
31
- </div>
32
- <script>
33
- document.addEventListener('mousemove', function(e) {
34
- const follower = document.getElementById('follower');
35
- follower.style.transform = 'translate(' + (e.clientX - 25) + 'px, ' + (e.clientY - 25) + 'px)';
36
- });
37
- </script>
38
- """, unsafe_allow_html=True)
39
-
40
- st.markdown('<div class="title">KASOTI</div>', unsafe_allow_html=True)
41
- st.markdown('<div class="subtitle">AI-Powered Guessing Game Challenge</div>', unsafe_allow_html=True)
42
 
43
 
44
  ######################################
@@ -146,7 +122,35 @@ def inject_custom_css():
146
  .progress-fill { height: 100%; background: linear-gradient(90deg, #6C63FF, #3B82F6);
147
  transition: width 0.5s ease; }
148
  .question-count { color: #6C63FF; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  </style>
 
 
 
 
 
 
 
 
 
 
 
 
150
  """, unsafe_allow_html=True)
151
 
152
  def show_confetti():
 
15
  from transformers import pipeline
16
 
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
 
20
  ######################################
 
122
  .progress-fill { height: 100%; background: linear-gradient(90deg, #6C63FF, #3B82F6);
123
  transition: width 0.5s ease; }
124
  .question-count { color: #6C63FF; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; }
125
+
126
+
127
+ /* === ADD CURSOR EFFECT HERE === */
128
+ body { cursor: none; }
129
+ .cursor-trail {
130
+ position: fixed;
131
+ width: 20px;
132
+ height: 20px;
133
+ border-radius: 50%;
134
+ background: radial-gradient(circle, #6C63FF 0%, #3B82F6 100%);
135
+ pointer-events: none;
136
+ transform: translate(-50%, -50%);
137
+ z-index: 9999;
138
+ opacity: 0.7;
139
+ transition: transform 0.1s ease-out;
140
+ }
141
  </style>
142
+ <script>
143
+ document.addEventListener('DOMContentLoaded', function() {
144
+ const cursor = document.createElement('div');
145
+ cursor.classList.add('cursor-trail');
146
+ document.body.appendChild(cursor);
147
+
148
+ document.addEventListener('mousemove', function(e) {
149
+ cursor.style.left = e.clientX + 'px';
150
+ cursor.style.top = e.clientY + 'px';
151
+ });
152
+ });
153
+ </script>
154
  """, unsafe_allow_html=True)
155
 
156
  def show_confetti():