Update app.py
Browse files3305 unmodified lines3306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403305 unmodified lines# Keep the actual clear button but hide itwith gr.Tab("🔗 Following"): # New tab for organized linkswith gr.Column():# Add Business, Family, Friends chatbots right below the button rowbusiness_html_display = gr.HTML(f"""<div style="margin-top: 3px;"><div style="font-weight: bold; margin-bottom: 3px; color: #006400; background: #e8f5e9; padding: 8px; border-radius: 8px;">Business Chatbots</div><div id="business-chatbots" style="display: flex;overflow-x: auto;gap: 8px;padding: 8px;width: 100%;background: #e8f5e9;border-radius: 8px;white-space: nowrap;"><script>async function loadBusinessChatbots() {{try {{const email = "{OWNER_EMAIL}"const response = await fetch(`https://script.google.com/macros/s/AKfycbxyKoCLcJT-Z4Y8-SaTJ-hyMFSv5qOm4TPFNk2CAexHNfTwMIOfc7KvwY0qdFxiuCZ2/exec?type=business&email=${{encodeURIComponent(email)}}`);const data = await response.json();if (data.status === "success") {{document.getElementById('business-chatbots').innerHTML = data.html;}} else {{document.getElementById('business-chatbots').innerHTML = 'No business chatbots found';}}}} catch (error) {{console.error('Error loading business chatbots:', error);document.getElementById('business-chatbots').innerHTML = 'Error loading chatbots';}}}}loadBusinessChatbots();setInterval(loadBusinessChatbots, 15000);</script></div></div>""")family_html_display = gr.HTML(f"""<div style="margin-top: 3px;"><div style="font-weight: bold; margin-bottom: 3px; color: #006400; background: #e8f5e9; padding: 8px; border-radius: 8px;">Family Chatbots</div><div id="family-chatbots" style="display: flex;overflow-x: auto;gap: 8px;padding: 8px;width: 100%;background: #e8f5e9;border-radius: 8px;white-space: nowrap;"><script>async function loadFamilyChatbots() {{try {{const email = "{OWNER_EMAIL}";const response = await fetch(`https://script.google.com/macros/s/AKfycbxyKoCLcJT-Z4Y8-SaTJ-hyMFSv5qOm4TPFNk2CAexHNfTwMIOfc7KvwY0qdFxiuCZ2/exec?type=family&email=${{encodeURIComponent(email)}}`);const data = await response.json();if (data.status === "success") {{document.getElementById('family-chatbots').innerHTML = data.html;}} else {{document.getElementById('family-chatbots').innerHTML = 'No family chatbots found';}}}} catch (error) {{console.error('Error loading family chatbots:', error);document.getElementById('family-chatbots').innerHTML = 'Error loading chatbots';}}}}loadFamilyChatbots();setInterval(loadFamilyChatbots, 15000);</script></div></div>""")friends_html_display = gr.HTML(f"""<div style="margin-top: 3px;"><div style="font-weight: bold; margin-bottom: 3px; color: #006400; background: #e8f5e9; padding: 8px; border-radius: 8px;">Friends Chatbots</div><div id="friends-chatbots" style="display: flex;overflow-x: auto;gap: 8px;padding: 8px;width: 100%;background: #e8f5e9;border-radius: 8px;white-space: nowrap;"><script>async function loadFriendsChatbots() {{try {{const email = "{OWNER_EMAIL}";const response = await fetch(`https://script.google.com/macros/s/AKfycbxyKoCLcJT-Z4Y8-SaTJ-hyMFSv5qOm4TPFNk2CAexHNfTwMIOfc7KvwY0qdFxiuCZ2/exec?type=friends&email=${{encodeURIComponent(email)}}`);const data = await response.json();if (data.status === "success") {{document.getElementById('friends-chatbots').innerHTML = data.html;}} else {{document.getElementById('friends-chatbots').innerHTML = 'No friends chatbots found';}}}} catch (error) {{console.error('Error loading friends chatbots:', error);document.getElementById('friends-chatbots').innerHTML = 'Error loading chatbots';}}}}loadFriendsChatbots();setInterval(loadFriendsChatbots, 15000);</script></div></div>""")# Add the BotBook embedbotbook_embed = gr.HTML(f"""<div style="margin-top: 20px;"><div style="font-weight: bold; margin-bottom: 3px; color: #006400; background: #e8f5e9; padding: 8px; border-radius: 8px;">BotBook</div><iframe src="https://gadek-gadek3.hf.space"style="width:100%; height:500px; border:none; border-radius:8px; margin-top:10px;"></iframe></div>""")3305 unmodified lines330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423305 unmodified lines# Keep the actual clear button but hide itwith gr.Tab("🔗 Following"): # New tab for organized linkswith gr.Column():# Add Business, Family, Friends chatbots right below the button rowbusiness_html_display = gr.HTML(f"""<div style="margin-top: 3px;"><div style="font-weight: bold; margin-bottom: 3px; color: #006400; background: #e8f5e9; padding: 8px; border-radius: 8px;">Business Chatbots</div><div id="business-chatbots" style="display: flex;overflow-x: auto;gap: 8px;padding: 8px;width: 100%;background: #e8f5e9;border-radius: 8px;white-space: nowrap;"><script>async function loadBusinessChatbots() {{try {{const email = "{OWNER_EMAIL}"const response = await fetch(`https://script.google.com/macros/s/AKfycbxyKoCLcJT-Z4Y8-SaTJ-hyMFSv5qOm4TPFNk2CAexHNfTwMIOfc7KvwY0qdFxiuCZ2/exec?type=business&email=${{encodeURIComponent(email)}}`);const data = await response.json();if (data.status === "success") {{document.getElementById('business-chatbots').innerHTML = data.html;}} else {{document.getElementById('business-chatbots').innerHTML = 'No business chatbots found';}}}} catch (error) {{console.error('Error loading business chatbots:', error);document.getElementById('business-chatbots').innerHTML = 'Error loading chatbots';}}}}loadBusinessChatbots();setInterval(loadBusinessChatbots, 15000);</script></div></div>""")family_html_display = gr.HTML(f"""<div style="margin-top: 3px;"><div style="font-weight: bold; margin-bottom: 3px; color: #006400; background: #e8f5e9; padding: 8px; border-radius: 8px;">Family Chatbots</div><div id="family-chatbots" style="display: flex;overflow-x: auto;gap: 8px;padding: 8px;width: 100%;background: #e8f5e9;border-radius: 8px;white-space: nowrap;"><script>async function loadFamilyChatbots() {{try {{const email = "{OWNER_EMAIL}";const response = await fetch(`https://script.google.com/macros/s/AKfycbxyKoCLcJT-Z4Y8-SaTJ-hyMFSv5qOm4TPFNk2CAexHNfTwMIOfc7KvwY0qdFxiuCZ2/exec?type=family&email=${{encodeURIComponent(email)}}`);const data = await response.json();if (data.status === "success") {{document.getElementById('family-chatbots').innerHTML = data.html;}} else {{document.getElementById('family-chatbots').innerHTML = 'No family chatbots found';}}}} catch (error) {{console.error('Error loading family chatbots:', error);document.getElementById('family-chatbots').innerHTML = 'Error loading chatbots';}}}}loadFamilyChatbots();setInterval(loadFamilyChatbots, 15000);</script></div></div>""")friends_html_display = gr.HTML(f"""<div style="margin-top: 3px;"><div style="font-weight: bold; margin-bottom: 3px; color: #006400; background: #e8f5e9; padding: 8px; border-radius: 8px;">Friends Chatbots</div><div id="friends-chatbots" style="display: flex;overflow-x: auto;gap: 8px;padding: 8px;width: 100%;background: #e8f5e9;border-radius: 8px;white-space: nowrap;"><script>async function loadFriendsChatbots() {{try {{const email = "{OWNER_EMAIL}";const response = await fetch(`https://script.google.com/macros/s/AKfycbxyKoCLcJT-Z4Y8-SaTJ-hyMFSv5qOm4TPFNk2CAexHNfTwMIOfc7KvwY0qdFxiuCZ2/exec?type=friends&email=${{encodeURIComponent(email)}}`);const data = await response.json();if (data.status === "success") {{document.getElementById('friends-chatbots').innerHTML = data.html;}} else {{document.getElementById('friends-chatbots').innerHTML = 'No friends chatbots found';}}}} catch (error) {{console.error('Error loading friends chatbots:', error);document.getElementById('friends-chatbots').innerHTML = 'Error loading chatbots';}}}}loadFriendsChatbots();setInterval(loadFriendsChatbots, 15000);</script></div></div>""")with gr.Tab("🔗 Following"): # New tab for organized linkswith gr.Column():# Add the BotBook embedbotbook_embed = gr.HTML(f"""<div style="margin-top: 20px;"><div style="font-weight: bold; margin-bottom: 3px; color: #006400; background: #e8f5e9; padding: 8px; border-radius: 8px;">BotBook</div><iframe src="https://gadek-gadek3.hf.space"style="width:100%; height:500px; border:none; border-radius:8px; margin-top:10px;"></iframe></div>""")
app.py+131-129