Onyxl commited on
Commit
b2652f1
·
verified ·
1 Parent(s): 0fdb1be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +44 -64
app.py CHANGED
@@ -1,73 +1,53 @@
1
  import streamlit as st
2
  import streamlit.components.v1 as components
3
- import random
4
- import time
5
 
6
- def terabites_system_core():
7
- st.set_page_config(page_title="TeraBites Core", layout="centered")
8
 
9
- # 1. The TeraBites Rubix Oval (Pure Visuals)
10
- # Using your cyan/white palette
11
- oval_html = """
12
- <div style="background: #000; padding: 30px; border-radius: 20px; text-align: center; border: 1px solid #333;">
13
- <div id="oval" style="
14
- width: 150px; height: 75px;
15
- border: 3px solid #fff; border-radius: 50%;
16
- margin: auto; display: flex; align-items: center; justify-content: center;
17
- position: relative; box-shadow: 0 0 20px #00f2ff;">
18
- <h2 style="color: #fff; font-family: 'Courier New'; margin: 0; letter-spacing: 2px;">TeraBites</h2>
19
- <div class="wave"></div>
20
- </div>
21
- <style>
22
- .wave {
23
- position: absolute; width: 100%; height: 100%;
24
- border: 2px solid #00f2ff; border-radius: 50%;
25
- animation: ripple 2s infinite;
26
- }
27
- @keyframes ripple {
28
- 0% { transform: scale(1); opacity: 1; }
29
- 100% { transform: scale(2.5); opacity: 0; }
30
- }
31
- </style>
32
  </div>
33
- """
34
- components.html(oval_html, height=180)
35
 
36
- # 2. Control Logic
37
- if 'sys_active' not in st.session_state:
38
- st.session_state.sys_active = False
 
 
39
 
40
- col1, col2 = st.columns(2)
41
- with col1:
42
- if st.button(" INITIALIZE"):
43
- st.session_state.sys_active = True
44
- with col2:
45
- if st.button("■ STOP ALL"):
46
- st.session_state.sys_active = False
47
- st.rerun()
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
- # 3. The Soundtrack & Data Feed
50
- if st.session_state.sys_active:
51
- # Plays the Megalovania Soundtrack
52
- st.video("https://www.youtube.com/watch?v=KK3KXAECte4")
53
-
54
- st.subheader("📡 SYSTEM DATA STREAM")
55
- terminal = st.empty()
56
-
57
- # Generates fake technical "chatter" instead of lyrics
58
- for _ in range(20):
59
- if not st.session_state.sys_active: break
60
-
61
- bit_rate = random.randint(320, 999)
62
- core_load = random.randint(70, 99)
63
- freq = random.uniform(44.1, 48.0)
64
-
65
- log_entry = f"FEED_ID: 0x{random.randint(1000, 9999)} | BITRATE: {bit_rate}kbps | LOAD: {core_load}% | FREQ: {freq:.1f}kHz"
66
-
67
- terminal.code(f"RUNNING: {log_entry}", language="bash")
68
- time.sleep(0.8) # Fast update to match the upbeat soundtrack
69
- else:
70
- st.info("Core Standby. Awaiting Signal...")
71
 
72
- if __name__ == "__main__":
73
- terabites_system_core()
 
1
  import streamlit as st
2
  import streamlit.components.v1 as components
 
 
3
 
4
+ # 1. Page Config
5
+ st.set_page_config(page_title="TeraBites | onyxneo", layout="centered")
6
 
7
+ # 2. Branding Header
8
+ st.markdown("""
9
+ <div style="text-align: center; margin-bottom: 20px;">
10
+ <h1 style="text-decoration: underline; margin-bottom: 5px;">Welcome to TeraBites</h1>
11
+ <p style="font-size: 1.1em; color: #00f2ff; margin-top: 0;">by onyxneo</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  </div>
13
+ """, unsafe_allow_html=True)
 
14
 
15
+ # 3. AI Team Description
16
+ st.info("""
17
+ **The AI Team** The TeraBites AI Team is a special Team focused to provide users the best AI possible
18
+ and best experience in HF by creating spaces like this!
19
+ """)
20
 
21
+ # 4. The TeraBites Oval (Visual Engine)
22
+ oval_html = """
23
+ <div style="background: #000; padding: 20px; border-radius: 15px; border: 1px solid #333; text-align: center;">
24
+ <div id="oval" style="
25
+ width: 140px; height: 70px;
26
+ border: 3px solid #fff; border-radius: 50%;
27
+ margin: auto; display: flex; align-items: center; justify-content: center;
28
+ position: relative; box-shadow: 0 0 15px #00f2ff;">
29
+ <h2 style="color: #fff; font-family: monospace; margin: 0;">TeraBites</h2>
30
+ <div style="position: absolute; width: 100%; height: 100%; border: 2px solid #00f2ff; border-radius: 50%; animation: ripple 2s infinite;"></div>
31
+ </div>
32
+ <style>
33
+ @keyframes ripple { 0% {transform: scale(1); opacity: 1;} 100% {transform: scale(2.2); opacity: 0;} }
34
+ </style>
35
+ </div>
36
+ """
37
+ components.html(oval_html, height=160)
38
+
39
+ # 5. Interactive Logic
40
+ if 'active' not in st.session_state:
41
+ st.session_state.active = False
42
 
43
+ col1, col2 = st.columns(2)
44
+ with col1:
45
+ if st.button("▶ INITIALIZE"):
46
+ st.session_state.active = True
47
+ with col2:
48
+ if st.button(" STOP"):
49
+ st.session_state.active = False
50
+ st.rerun()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
+ if st.session_state.active:
53
+ st.video("https://www.youtube.com/watch?v=KK3KXAECte4") # Megalovania