import gradio as gr # Текст вірша poem = """ 🚴 To my Mr Hentosh Whenever it's a special day, Or even if it's not. You're someone I adore, my man, My Levandivka prince Keep wondering how I might call This man and our majestic bond I guess I might suggest this saying: "Good people never meet for nothing". It would be of utmost importance To mention a few of Ustym's virtues. Even if some lie on the surface The new ones hit me great quite often. Needless to say, my IT pro, my sweetest breakfast ever shared. A responsibly-caring guy that I got for myself. Precision, scrutiny, his curiousity, Don't let me question Ustym's uniquity To keep the poem intimately-secret, so that no man shall lay the eyes on it, Or one day I might show it to my babies kin Whatever future might behold for us Eve wants you, loves you in her heart of hearts """ # Фонова картинка background_image_url = "https://www.elite-wheels.com/wp-content/uploads/2023/08/Gravel-Bike.jpg" # Кастомний CSS custom_css = f""" body, .gradio-container {{ margin: 0; padding: 0; height: 100vh; display: flex; justify-content: center; align-items: center; background-image: url('{background_image_url}'); background-repeat: no-repeat; background-size: cover; background-position: center; font-family: 'Helvetica', sans-serif; }} #poem-markdown {{ text-align: center; font-size: 22px; line-height: 1.7; color: #000000; white-space: pre-line; padding: 30px; border-radius: 15px; background: rgba(255, 255, 255, 0.2); max-width: 800px; box-shadow: 0 0 15px rgba(255,255,255,0.3); }} """ # Головний блок Gradio with gr.Blocks(css=custom_css, title="Top Secrecy") as demo: gr.Markdown(poem, elem_id="poem-markdown") # Запуск без share (Hugging Face Space вже дає постійний URL) demo.launch(ssr_mode=False)