Spaces:
Paused
Paused
Download app.py from ServerX/Streamcomunity: direct link, hf CLI and curl.
- Browser
- Download file 1.92 kB
-
https://huggingface.co/spaces/ServerX/Streamcomunity/resolve/main/app.py
- Command line
-
hf download hf://spaces/ServerX/Streamcomunity/app.py
-
curl -L -o app.py https://huggingface.co/spaces/ServerX/Streamcomunity/resolve/main/app.py
1.92 kB
| import streamlit as st | |
| from streamlit.components.v1 import html | |
| # Configurazione della pagina | |
| st.set_page_config(page_title="Smart TV Browser", layout="wide", initial_sidebar_state="collapsed") | |
| # CSS per personalizzare lo stile Smart TV | |
| st.markdown(""" | |
| <style> | |
| .title { | |
| font-size: 50px; | |
| font-weight: bold; | |
| color: #FFFFFF; | |
| text-align: center; | |
| margin-bottom: 30px; | |
| } | |
| .button-container { | |
| display: flex; | |
| justify-content: center; | |
| gap: 20px; | |
| margin-top: 20px; | |
| } | |
| .button { | |
| background-color: #1E90FF; | |
| border: none; | |
| color: white; | |
| padding: 20px 40px; | |
| font-size: 24px; | |
| font-weight: bold; | |
| text-align: center; | |
| border-radius: 10px; | |
| cursor: pointer; | |
| } | |
| .button:hover { | |
| background-color: #00BFFF; | |
| } | |
| .iframe-container { | |
| display: flex; | |
| justify-content: center; | |
| margin-top: 20px; | |
| } | |
| iframe { | |
| width: 100%; | |
| height: 600px; | |
| border: none; | |
| } | |
| </style> | |
| """, unsafe_allow_html=True) | |
| # Titolo principale | |
| st.markdown('<div class="title">Smart TV Streaming Interface</div>', unsafe_allow_html=True) | |
| # Pulsanti per selezionare contenuti | |
| st.markdown('<div class="button-container">', unsafe_allow_html=True) | |
| col1, col2, col3 = st.columns(3) | |
| with col1: | |
| if st.button("Sito Ufficiale"): | |
| url = "https://streamingcommunity.paris/" | |
| with col2: | |
| if st.button("YouTube"): | |
| url = "https://www.youtube.com" | |
| with col3: | |
| if st.button("Netflix"): | |
| url = "https://www.netflix.com" | |
| st.markdown('</div>', unsafe_allow_html=True) | |
| # Contenitore iframe per il sito selezionato | |
| if 'url' in locals(): | |
| st.markdown(f'<div class="iframe-container"><iframe src="{url}"></iframe></div>', unsafe_allow_html=True) | |
| else: | |
| st.write("Seleziona un contenuto sopra per visualizzarlo.") | |