Update app.py
Browse files
app.py
CHANGED
|
@@ -3467,139 +3467,7 @@ with gr.Blocks(
|
|
| 3467 |
">tos</span>
|
| 3468 |
</div>
|
| 3469 |
|
| 3470 |
-
<!-- Modern Ad Widget -->
|
| 3471 |
-
<div id="adWidget" style="
|
| 3472 |
-
position: absolute;
|
| 3473 |
-
top: 20px;
|
| 3474 |
-
right: 20px;
|
| 3475 |
-
width: 180px;
|
| 3476 |
-
background: white;
|
| 3477 |
-
border-radius: 12px;
|
| 3478 |
-
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
|
| 3479 |
-
padding: 15px;
|
| 3480 |
-
font-family: 'Comfortaa', -apple-system, sans-serif;
|
| 3481 |
-
z-index: 1001;
|
| 3482 |
-
animation: fadeIn 0.5s ease-out;
|
| 3483 |
-
">
|
| 3484 |
-
<div style="
|
| 3485 |
-
display: flex;
|
| 3486 |
-
justify-content: space-between;
|
| 3487 |
-
align-items: center;
|
| 3488 |
-
margin-bottom: 12px;
|
| 3489 |
-
">
|
| 3490 |
-
<span style="
|
| 3491 |
-
font-size: 11px;
|
| 3492 |
-
color: #666;
|
| 3493 |
-
font-weight: 600;
|
| 3494 |
-
letter-spacing: 0.5px;
|
| 3495 |
-
">Go$$Ads</span>
|
| 3496 |
-
<button id="closeAd" style="
|
| 3497 |
-
background: none;
|
| 3498 |
-
border: none;
|
| 3499 |
-
font-size: 16px;
|
| 3500 |
-
cursor: pointer;
|
| 3501 |
-
color: #999;
|
| 3502 |
-
padding: 0 5px;
|
| 3503 |
-
transition: all 0.2s;
|
| 3504 |
-
" onmouseover="this.style.color='#ff0000'" onmouseout="this.style.color='#999'">✕</button>
|
| 3505 |
-
</div>
|
| 3506 |
-
|
| 3507 |
-
<!-- Ad Content -->
|
| 3508 |
-
<a href="https://sites.google.com/view/goss-app/subscriptions" target="_blank" style="text-decoration: none; color: inherit;">
|
| 3509 |
-
<div style="
|
| 3510 |
-
background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
|
| 3511 |
-
border-radius: 8px;
|
| 3512 |
-
overflow: hidden;
|
| 3513 |
-
margin-bottom: 12px;
|
| 3514 |
-
">
|
| 3515 |
-
<img src="https://i.imgur.com/PznT4qo.png"
|
| 3516 |
-
style="width: 100%; height: auto; display: block;">
|
| 3517 |
-
<div style="padding: 10px;">
|
| 3518 |
-
<div style="
|
| 3519 |
-
font-size: 13px;
|
| 3520 |
-
font-weight: 600;
|
| 3521 |
-
color: #333;
|
| 3522 |
-
margin-bottom: 5px;
|
| 3523 |
-
">Special Offer!</div>
|
| 3524 |
-
<div style="
|
| 3525 |
-
font-size: 11px;
|
| 3526 |
-
color: #666;
|
| 3527 |
-
line-height: 1.4;
|
| 3528 |
-
">Access Premium .</div>
|
| 3529 |
-
</div>
|
| 3530 |
-
</div>
|
| 3531 |
-
</a>
|
| 3532 |
-
|
| 3533 |
-
<div style="
|
| 3534 |
-
display: flex;
|
| 3535 |
-
justify-content: space-between;
|
| 3536 |
-
font-size: 10px;
|
| 3537 |
-
color: #999;
|
| 3538 |
-
padding-top: 8px;
|
| 3539 |
-
border-top: 1px solid #eee;
|
| 3540 |
-
">
|
| 3541 |
-
<span>👁️ <span id="viewCount">Loading...</span></span>
|
| 3542 |
-
<span id="countdown">10s</span>
|
| 3543 |
-
</div>
|
| 3544 |
-
</div>
|
| 3545 |
-
</div>
|
| 3546 |
-
|
| 3547 |
-
<script>
|
| 3548 |
-
// Replace with your GAS web app URL
|
| 3549 |
-
const GAS_WEB_APP_URL = "https://script.google.com/macros/s/AKfycbwjP7RQbrdu5UVv393C2PLCY1o6z9FYSrJM8pYDvLlYd7hZglHOccozv5viaOHMwKLNKQ/exec";
|
| 3550 |
-
|
| 3551 |
-
// Main functionality
|
| 3552 |
-
document.addEventListener('DOMContentLoaded', function() {
|
| 3553 |
-
// Fetch view count from Google Apps Script
|
| 3554 |
-
fetch(GAS_WEB_APP_URL)
|
| 3555 |
-
.then(response => {
|
| 3556 |
-
if (!response.ok) throw new Error('Network error');
|
| 3557 |
-
return response.text();
|
| 3558 |
-
})
|
| 3559 |
-
.then(views => {
|
| 3560 |
-
document.getElementById('viewCount').textContent = views;
|
| 3561 |
-
})
|
| 3562 |
-
.catch(error => {
|
| 3563 |
-
console.error('Error fetching view count:', error);
|
| 3564 |
-
document.getElementById('viewCount').textContent = 'Offline';
|
| 3565 |
-
});
|
| 3566 |
-
|
| 3567 |
-
// 10-second countdown
|
| 3568 |
-
let secondsLeft = 10;
|
| 3569 |
-
const countdownElement = document.getElementById('countdown');
|
| 3570 |
-
const countdownInterval = setInterval(function() {
|
| 3571 |
-
secondsLeft--;
|
| 3572 |
-
countdownElement.textContent = secondsLeft + 's';
|
| 3573 |
-
|
| 3574 |
-
if (secondsLeft <= 0) {
|
| 3575 |
-
clearInterval(countdownInterval);
|
| 3576 |
-
closeAd();
|
| 3577 |
-
}
|
| 3578 |
-
}, 1000);
|
| 3579 |
|
| 3580 |
-
// Close button functionality
|
| 3581 |
-
document.getElementById('closeAd').addEventListener('click', closeAd);
|
| 3582 |
-
|
| 3583 |
-
function closeAd() {
|
| 3584 |
-
const adWidget = document.getElementById('adWidget');
|
| 3585 |
-
adWidget.style.animation = 'fadeOut 0.9s ease-out';
|
| 3586 |
-
setTimeout(function() {
|
| 3587 |
-
adWidget.style.display = 'none';
|
| 3588 |
-
}, 300);
|
| 3589 |
-
}
|
| 3590 |
-
});
|
| 3591 |
-
</script>
|
| 3592 |
-
|
| 3593 |
-
<style>
|
| 3594 |
-
@keyframes fadeIn {
|
| 3595 |
-
from { opacity: 0; transform: translateY(-10px); }
|
| 3596 |
-
to { opacity: 1; transform: translateY(0); }
|
| 3597 |
-
}
|
| 3598 |
-
@keyframes fadeOut {
|
| 3599 |
-
from { opacity: 1; transform: translateY(0); }
|
| 3600 |
-
to { opacity: 0; transform: translateY(-10px); }
|
| 3601 |
-
}
|
| 3602 |
-
</style>
|
| 3603 |
""")
|
| 3604 |
|
| 3605 |
with gr.Tab("Text-To-Image"): # New tab for organized links
|
|
@@ -3643,139 +3511,7 @@ with gr.Blocks(
|
|
| 3643 |
">tos</span>
|
| 3644 |
</div>
|
| 3645 |
|
| 3646 |
-
<!-- Modern Ad Widget -->
|
| 3647 |
-
<div id="adWidget" style="
|
| 3648 |
-
position: absolute;
|
| 3649 |
-
top: 20px;
|
| 3650 |
-
right: 20px;
|
| 3651 |
-
width: 180px;
|
| 3652 |
-
background: white;
|
| 3653 |
-
border-radius: 12px;
|
| 3654 |
-
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
|
| 3655 |
-
padding: 15px;
|
| 3656 |
-
font-family: 'Comfortaa', -apple-system, sans-serif;
|
| 3657 |
-
z-index: 1001;
|
| 3658 |
-
animation: fadeIn 0.5s ease-out;
|
| 3659 |
-
">
|
| 3660 |
-
<div style="
|
| 3661 |
-
display: flex;
|
| 3662 |
-
justify-content: space-between;
|
| 3663 |
-
align-items: center;
|
| 3664 |
-
margin-bottom: 12px;
|
| 3665 |
-
">
|
| 3666 |
-
<span style="
|
| 3667 |
-
font-size: 11px;
|
| 3668 |
-
color: #666;
|
| 3669 |
-
font-weight: 600;
|
| 3670 |
-
letter-spacing: 0.5px;
|
| 3671 |
-
">Go$$Ads</span>
|
| 3672 |
-
<button id="closeAd" style="
|
| 3673 |
-
background: none;
|
| 3674 |
-
border: none;
|
| 3675 |
-
font-size: 16px;
|
| 3676 |
-
cursor: pointer;
|
| 3677 |
-
color: #999;
|
| 3678 |
-
padding: 0 5px;
|
| 3679 |
-
transition: all 0.2s;
|
| 3680 |
-
" onmouseover="this.style.color='#ff0000'" onmouseout="this.style.color='#999'">✕</button>
|
| 3681 |
-
</div>
|
| 3682 |
-
|
| 3683 |
-
<!-- Ad Content -->
|
| 3684 |
-
<a href="https://sites.google.com/view/goss-app/subscriptions" target="_blank" style="text-decoration: none; color: inherit;">
|
| 3685 |
-
<div style="
|
| 3686 |
-
background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
|
| 3687 |
-
border-radius: 8px;
|
| 3688 |
-
overflow: hidden;
|
| 3689 |
-
margin-bottom: 12px;
|
| 3690 |
-
">
|
| 3691 |
-
<img src="https://i.imgur.com/PznT4qo.png"
|
| 3692 |
-
style="width: 100%; height: auto; display: block;">
|
| 3693 |
-
<div style="padding: 10px;">
|
| 3694 |
-
<div style="
|
| 3695 |
-
font-size: 13px;
|
| 3696 |
-
font-weight: 600;
|
| 3697 |
-
color: #333;
|
| 3698 |
-
margin-bottom: 5px;
|
| 3699 |
-
">Special Offer!</div>
|
| 3700 |
-
<div style="
|
| 3701 |
-
font-size: 11px;
|
| 3702 |
-
color: #666;
|
| 3703 |
-
line-height: 1.4;
|
| 3704 |
-
">Access Premium .</div>
|
| 3705 |
-
</div>
|
| 3706 |
-
</div>
|
| 3707 |
-
</a>
|
| 3708 |
-
|
| 3709 |
-
<div style="
|
| 3710 |
-
display: flex;
|
| 3711 |
-
justify-content: space-between;
|
| 3712 |
-
font-size: 10px;
|
| 3713 |
-
color: #999;
|
| 3714 |
-
padding-top: 8px;
|
| 3715 |
-
border-top: 1px solid #eee;
|
| 3716 |
-
">
|
| 3717 |
-
<span>👁️ <span id="viewCount">Loading...</span></span>
|
| 3718 |
-
<span id="countdown">10s</span>
|
| 3719 |
-
</div>
|
| 3720 |
-
</div>
|
| 3721 |
-
</div>
|
| 3722 |
-
|
| 3723 |
-
<script>
|
| 3724 |
-
// Replace with your GAS web app URL
|
| 3725 |
-
const GAS_WEB_APP_URL = "https://script.google.com/macros/s/AKfycbwjP7RQbrdu5UVv393C2PLCY1o6z9FYSrJM8pYDvLlYd7hZglHOccozv5viaOHMwKLNKQ/exec";
|
| 3726 |
-
|
| 3727 |
-
// Main functionality
|
| 3728 |
-
document.addEventListener('DOMContentLoaded', function() {
|
| 3729 |
-
// Fetch view count from Google Apps Script
|
| 3730 |
-
fetch(GAS_WEB_APP_URL)
|
| 3731 |
-
.then(response => {
|
| 3732 |
-
if (!response.ok) throw new Error('Network error');
|
| 3733 |
-
return response.text();
|
| 3734 |
-
})
|
| 3735 |
-
.then(views => {
|
| 3736 |
-
document.getElementById('viewCount').textContent = views;
|
| 3737 |
-
})
|
| 3738 |
-
.catch(error => {
|
| 3739 |
-
console.error('Error fetching view count:', error);
|
| 3740 |
-
document.getElementById('viewCount').textContent = 'Offline';
|
| 3741 |
-
});
|
| 3742 |
-
|
| 3743 |
-
// 10-second countdown
|
| 3744 |
-
let secondsLeft = 10;
|
| 3745 |
-
const countdownElement = document.getElementById('countdown');
|
| 3746 |
-
const countdownInterval = setInterval(function() {
|
| 3747 |
-
secondsLeft--;
|
| 3748 |
-
countdownElement.textContent = secondsLeft + 's';
|
| 3749 |
-
|
| 3750 |
-
if (secondsLeft <= 0) {
|
| 3751 |
-
clearInterval(countdownInterval);
|
| 3752 |
-
closeAd();
|
| 3753 |
-
}
|
| 3754 |
-
}, 1000);
|
| 3755 |
|
| 3756 |
-
// Close button functionality
|
| 3757 |
-
document.getElementById('closeAd').addEventListener('click', closeAd);
|
| 3758 |
-
|
| 3759 |
-
function closeAd() {
|
| 3760 |
-
const adWidget = document.getElementById('adWidget');
|
| 3761 |
-
adWidget.style.animation = 'fadeOut 0.9s ease-out';
|
| 3762 |
-
setTimeout(function() {
|
| 3763 |
-
adWidget.style.display = 'none';
|
| 3764 |
-
}, 300);
|
| 3765 |
-
}
|
| 3766 |
-
});
|
| 3767 |
-
</script>
|
| 3768 |
-
|
| 3769 |
-
<style>
|
| 3770 |
-
@keyframes fadeIn {
|
| 3771 |
-
from { opacity: 0; transform: translateY(-10px); }
|
| 3772 |
-
to { opacity: 1; transform: translateY(0); }
|
| 3773 |
-
}
|
| 3774 |
-
@keyframes fadeOut {
|
| 3775 |
-
from { opacity: 1; transform: translateY(0); }
|
| 3776 |
-
to { opacity: 0; transform: translateY(-10px); }
|
| 3777 |
-
}
|
| 3778 |
-
</style>
|
| 3779 |
""")
|
| 3780 |
|
| 3781 |
|
|
|
|
| 3467 |
">tos</span>
|
| 3468 |
</div>
|
| 3469 |
|
|
|
|
|
|
|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