Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -343,107 +343,99 @@ for message in st.session_state.chat_history:
|
|
| 343 |
|
| 344 |
# Chat input
|
| 345 |
if not st.session_state.chat_active:
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
});
|
| 355 |
});
|
| 356 |
-
|
|
|
|
| 357 |
|
| 358 |
-
|
| 359 |
-
|
| 360 |
-
|
| 361 |
-
|
| 362 |
-
|
| 363 |
|
| 364 |
-
|
| 365 |
-
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
|
| 370 |
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 376 |
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
margin: 0 auto; /* Center container */
|
| 385 |
-
max-width: 1200px; /* Optional: Adjust based on content width */
|
| 386 |
-
}
|
| 387 |
-
|
| 388 |
-
.section {
|
| 389 |
-
flex: 1;
|
| 390 |
-
min-width: 150px;
|
| 391 |
-
max-width: 300px; /* Adjusted width */
|
| 392 |
-
min-height: 150px;
|
| 393 |
-
border: 1px solid #afafaf;
|
| 394 |
-
border-radius: 10px;
|
| 395 |
-
padding: 5px;
|
| 396 |
-
background-color: transparent;
|
| 397 |
-
margin: 3px;
|
| 398 |
-
text-align: center;
|
| 399 |
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 400 |
-
box-sizing: border-box;
|
| 401 |
-
font-size: 12px;
|
| 402 |
-
transition: background-color 0.3s ease;
|
| 403 |
-
}
|
| 404 |
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
|
| 409 |
-
|
| 410 |
-
|
| 411 |
-
}
|
| 412 |
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
| 417 |
-
line-height: 1.4;
|
| 418 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 419 |
|
| 420 |
-
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
|
| 424 |
-
|
| 425 |
-
|
| 426 |
-
|
| 427 |
-
|
| 428 |
-
<div class="content">
|
| 429 |
-
<h1 style="background: linear-gradient(45deg, #4b25ea, #bd18e6, #fb590e); -webkit-background-clip: text; color: transparent; font-size: 24px;">How can I help you today?</h1>
|
| 430 |
-
|
| 431 |
-
<div class="section-container">
|
| 432 |
-
<div class="section">
|
| 433 |
-
<h2>Find</h2>
|
| 434 |
-
<p>Discover all your great TrustBuilders®. <br> Example: Find Development Trust Builders® for World Vision</p>
|
| 435 |
-
</div>
|
| 436 |
-
<div class="section">
|
| 437 |
-
<h2>Create</h2>
|
| 438 |
-
<p>Generate trust-optimised solutions : <br>Example: Find World Vision development TrustBuilders®. Then use them to write a 200-word annual report article. Enthusiastic tone.</p>
|
| 439 |
-
</div>
|
| 440 |
-
<div class="section">
|
| 441 |
-
<h2>Trust-optimise</h2>
|
| 442 |
-
<p>Paste your LinkedIn profile, EDM or blog and ask TrustAI® to improve it using specific Trust Buckets® and add your specific TrustBuilders® as examples.</p>
|
| 443 |
-
</div>
|
| 444 |
-
</div>
|
| 445 |
</div>
|
| 446 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 447 |
else:
|
| 448 |
st.empty()
|
| 449 |
|
|
|
|
| 343 |
|
| 344 |
# Chat input
|
| 345 |
if not st.session_state.chat_active:
|
| 346 |
+
st.markdown("""
|
| 347 |
+
<script>
|
| 348 |
+
document.addEventListener('DOMContentLoaded', (event) => {
|
| 349 |
+
const svgs = document.querySelectorAll('svg');
|
| 350 |
+
svgs.forEach(svg => {
|
| 351 |
+
if (svg.getAttribute('xmlns') === 'http://www.w3.org/2000/svg' && svg.getAttribute('width') === '18' && svg.getAttribute('height') === '18') {
|
| 352 |
+
svg.style.display = 'none';
|
| 353 |
+
}
|
|
|
|
| 354 |
});
|
| 355 |
+
});
|
| 356 |
+
</script>
|
| 357 |
|
| 358 |
+
<style>
|
| 359 |
+
/* Hide all <a> elements inside elements with block-container and st-emotion-cache-1eo1tir ea3mdgi5 classes */
|
| 360 |
+
.block-container.st-emotion-cache-1eo1tir.ea3mdgi5 a {
|
| 361 |
+
display: none !important;
|
| 362 |
+
}
|
| 363 |
|
| 364 |
+
/* Ensure links in the sidebar are visible and underlined */
|
| 365 |
+
.stSidebar a {
|
| 366 |
+
display: inline !important;
|
| 367 |
+
text-decoration: underline !important;
|
| 368 |
+
color: inherit !important;
|
| 369 |
+
}
|
| 370 |
|
| 371 |
+
/* Additional styles */
|
| 372 |
+
.section-container {
|
| 373 |
+
display: flex;
|
| 374 |
+
justify-content: center;
|
| 375 |
+
align-items: stretch;
|
| 376 |
+
flex-wrap: wrap;
|
| 377 |
+
gap: 4px;
|
| 378 |
+
}
|
| 379 |
+
|
| 380 |
+
.section {
|
| 381 |
+
flex: 1;
|
| 382 |
+
min-width: 150px;
|
| 383 |
+
max-width: 90px;
|
| 384 |
+
min-height: 150px;
|
| 385 |
+
border: 1px solid #afafaf;
|
| 386 |
+
border-radius: 10px;
|
| 387 |
+
padding: 5px;
|
| 388 |
+
background-color: transparent;
|
| 389 |
+
margin: 7px;
|
| 390 |
+
text-align: center;
|
| 391 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 392 |
+
box-sizing: border-box;
|
| 393 |
+
font-size: 12px;
|
| 394 |
+
transition: background-color 0.3s ease;
|
| 395 |
+
}
|
| 396 |
|
| 397 |
+
.section h2 {
|
| 398 |
+
color: #afafaf;
|
| 399 |
+
font-size: 14px;
|
| 400 |
+
margin-bottom: 8px;
|
| 401 |
+
border-bottom: 1px solid #afafaf;
|
| 402 |
+
padding-bottom: 4px;
|
| 403 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 404 |
|
| 405 |
+
.section p {
|
| 406 |
+
color: #afafaf;
|
| 407 |
+
font-size: 11px;
|
| 408 |
+
margin: 5px 0;
|
| 409 |
+
line-height: 1.4;
|
| 410 |
+
}
|
|
|
|
| 411 |
|
| 412 |
+
@media (max-width: 100px) {
|
| 413 |
+
.section {
|
| 414 |
+
min-width: 90%;
|
| 415 |
+
max-width: 90%;
|
|
|
|
| 416 |
}
|
| 417 |
+
}
|
| 418 |
+
</style>
|
| 419 |
+
|
| 420 |
+
<h1 style='text-align: center; color: #b4b4b4;'>How can I help you today?</h1>
|
| 421 |
|
| 422 |
+
<div class="section-container">
|
| 423 |
+
<div class="section">
|
| 424 |
+
<h2>Find</h2>
|
| 425 |
+
<p>Discover all your great TrustBuilders®. <br> Example: Find Development Trust Builders® for World Vision
|
| 426 |
+
</div>
|
| 427 |
+
<div class="section">
|
| 428 |
+
<h2>Create</h2>
|
| 429 |
+
<p>Generate trust-optimised solutions: <br>Example: Find World Vision development TrustBuilders®. Then use them to write a 200-word annual report article. Enthusiastic tone.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 430 |
</div>
|
| 431 |
+
<div class="section">
|
| 432 |
+
<h2>Trust-optimise</h2>
|
| 433 |
+
<p>Paste your LinkedIn profile, EDM or blog and ask TrustAI® to improve it using specific Trust Buckets® and add your specific TrustBuilders® as examples.</p>
|
| 434 |
+
</div>
|
| 435 |
+
</div>
|
| 436 |
+
""", unsafe_allow_html=True)
|
| 437 |
+
|
| 438 |
+
|
| 439 |
else:
|
| 440 |
st.empty()
|
| 441 |
|