Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -276,30 +276,81 @@ def ask_help_agent(query):
|
|
| 276 |
|
| 277 |
|
| 278 |
def show_techniques_modal():
|
| 279 |
-
# Use st.markdown with unsafe_allow_html=True
|
| 280 |
st.markdown("""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 281 |
<div class="info-modal-backdrop" id="infoBackdrop">
|
| 282 |
<div class="info-modal">
|
| 283 |
-
<button class="close-modal-btn" onclick="document.getElementById('infoBackdrop').style.display='none'">×</button>
|
| 284 |
<h3 style="color: #6C63FF; margin-bottom: 1.5rem; text-align: center;">Project Techniques & Limitations</h3>
|
| 285 |
|
| 286 |
-
AI Models Used
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
Known Limitations:
|
| 294 |
-
1. Voice input may take 5-10 seconds to process sentences Which is fine.
|
| 295 |
-
2. But Single words (like "yes", "object") may take 10-20 minutes, which is irritating.
|
| 296 |
-
3. Language Support - While Whisper understands and write Urdu, but the game only supports English response
|
| 297 |
-
|
| 298 |
|
| 299 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 300 |
</div>
|
|
|
|
| 301 |
<script>
|
| 302 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 303 |
</script>
|
| 304 |
""", unsafe_allow_html=True)
|
| 305 |
|
|
|
|
| 276 |
|
| 277 |
|
| 278 |
def show_techniques_modal():
|
|
|
|
| 279 |
st.markdown("""
|
| 280 |
+
<style>
|
| 281 |
+
.info-modal-backdrop {
|
| 282 |
+
position: fixed;
|
| 283 |
+
top: 0;
|
| 284 |
+
left: 0;
|
| 285 |
+
right: 0;
|
| 286 |
+
bottom: 0;
|
| 287 |
+
background: rgba(0,0,0,0.5);
|
| 288 |
+
z-index: 999;
|
| 289 |
+
display: block;
|
| 290 |
+
}
|
| 291 |
+
.info-modal {
|
| 292 |
+
position: fixed;
|
| 293 |
+
top: 50%;
|
| 294 |
+
left: 50%;
|
| 295 |
+
transform: translate(-50%, -50%);
|
| 296 |
+
background: white;
|
| 297 |
+
padding: 2rem;
|
| 298 |
+
border-radius: 20px;
|
| 299 |
+
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
|
| 300 |
+
z-index: 1000;
|
| 301 |
+
max-width: 600px;
|
| 302 |
+
width: 90%;
|
| 303 |
+
}
|
| 304 |
+
.close-modal-btn {
|
| 305 |
+
position: absolute;
|
| 306 |
+
top: 1rem;
|
| 307 |
+
right: 1rem;
|
| 308 |
+
background: none;
|
| 309 |
+
border: none;
|
| 310 |
+
font-size: 1.5rem;
|
| 311 |
+
cursor: pointer;
|
| 312 |
+
color: #64748B;
|
| 313 |
+
}
|
| 314 |
+
</style>
|
| 315 |
+
|
| 316 |
<div class="info-modal-backdrop" id="infoBackdrop">
|
| 317 |
<div class="info-modal">
|
| 318 |
+
<button class="close-modal-btn" onclick="window.parent.document.getElementById('infoBackdrop').style.display='none'">×</button>
|
| 319 |
<h3 style="color: #6C63FF; margin-bottom: 1.5rem; text-align: center;">Project Techniques & Limitations</h3>
|
| 320 |
|
| 321 |
+
<p><strong>AI Models Used:</strong></p>
|
| 322 |
+
<ol>
|
| 323 |
+
<li>Groq Llama 3.3-70B - For generating strategic questions and final guesses</li>
|
| 324 |
+
<li>Mistral Tiny - Powers the help chat assistant</li>
|
| 325 |
+
<li>OpenAI Whisper - Converts speech to text in real-time</li>
|
| 326 |
+
<li>Hard Prompt Tuning - Carefully engineered prompts to optimize model performance</li>
|
| 327 |
+
</ol>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 328 |
|
| 329 |
+
<p><strong>Known Limitations:</strong></p>
|
| 330 |
+
<ol>
|
| 331 |
+
<li>Voice input may take 5-10 seconds to process sentences (which is fine)</li>
|
| 332 |
+
<li>Single words (like "yes", "object") may take 10-20 seconds</li>
|
| 333 |
+
<li>Language Support - While Whisper understands Urdu, the game only supports English responses</li>
|
| 334 |
+
</ol>
|
| 335 |
+
</div>
|
| 336 |
</div>
|
| 337 |
+
|
| 338 |
<script>
|
| 339 |
+
// Close function that works within Streamlit's iframe
|
| 340 |
+
function closeModal() {
|
| 341 |
+
var iframe = window.parent.document.querySelectorAll('iframe');
|
| 342 |
+
iframe.forEach(function(frame) {
|
| 343 |
+
if (frame.contentWindow === window) {
|
| 344 |
+
frame.parentNode.querySelector('.info-modal-backdrop').style.display = 'none';
|
| 345 |
+
}
|
| 346 |
+
});
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
// Assign the close function to the button
|
| 350 |
+
window.onload = function() {
|
| 351 |
+
var closeBtn = document.querySelector('.close-modal-btn');
|
| 352 |
+
closeBtn.onclick = closeModal;
|
| 353 |
+
};
|
| 354 |
</script>
|
| 355 |
""", unsafe_allow_html=True)
|
| 356 |
|