File size: 1,358 Bytes
88fbdc0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
"""
Fast Loading Configuration for Streamlit
تحسين سرعة تحميل Streamlit
"""

import streamlit as st

def apply_fast_loading_config():
    """Apply configurations for faster loading"""
    
    # Custom CSS to prevent flash of unstyled content
    st.markdown("""
    <style>
    /* Hide loading spinner faster */
    .stSpinner {
        display: none !important;
    }
    
    /* Faster fade-in */
    .main .block-container {
        animation: fadeIn 0.1s ease-in-out;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    /* Optimize fonts loading */
    body {
        font-display: swap;
    }
    
    /* Remove unnecessary margins */
    .block-container {
        padding-top: 1rem;
    }
    </style>
    """, unsafe_allow_html=True)

def show_instant_content():
    """Show content immediately without waiting"""
    st.markdown("""
    <div style="text-align: center; padding: 20px;">
        <h1>🎵 SyncMaster</h1>
        <p>منصة المزامنة الذكية بين الصوت والنص</p>
        <div style="background: linear-gradient(45deg, #1f77b4, #17becf); 
                    color: white; padding: 10px; border-radius: 5px; margin: 10px;">
            ✅ التطبيق جاهز للاستخدام
        </div>
    </div>
    """, unsafe_allow_html=True)