Spaces:
Running
Running
| import os | |
| os.environ["STREAMLIT_CONFIG_DIR"] = "/tmp/.streamlit" | |
| import streamlit as st | |
| import random | |
| import time | |
| import streamlit as st | |
| import base64 | |
| # Convert image to base64 (so it works perfectly inside HTML) | |
| def get_base64_image(image_path): | |
| with open(image_path, "rb") as img_file: | |
| return base64.b64encode(img_file.read()).decode() | |
| image_base64 = get_base64_image("static/mylogo.png") | |
| st.markdown( | |
| f""" | |
| <div style="text-align:center;"> | |
| <div style="width:100px;height:100px;border-radius:50%; | |
| background:linear-gradient(to bottom right,#dc2626,#7f1d1d); | |
| display:flex;align-items:center;justify-content:center; | |
| margin:auto;border:4px solid white;overflow:hidden;"> | |
| <img src="data:image/png;base64,{image_base64}" | |
| style="width:90%;height:90%;object-fit:cover;border-radius:50%;" /> | |
| </div> | |
| <h1 style=" | |
| color:#FFD700; | |
| font-family:'Poppins', sans-serif; | |
| font-size:40px; | |
| letter-spacing:5px; | |
| margin-top:10px; | |
| text-shadow:2px 2px 6px rgba(0,0,0,0.5); | |
| "> | |
| UZAIR FOREX CLUB | |
| </h1> | |
| </div> | |
| """, | |
| unsafe_allow_html=True | |
| ) | |
| platforms = ['QUOTEX', 'POCKET OPTION', 'BINOMO', 'OLYMP', 'IQ OPTION', 'EXPERT OPTION'] | |
| currency_pairs = [ | |
| 'USD/BRL (OTC)', 'USD/BRL (CTC)', 'USD/ARS (OTC)', 'USD/DZD (OTC)', | |
| 'USD/COP (OTC)', 'CAD/CHF (OTC)', 'USD/BDT (OTC)', 'USD/PKR (OTC)' | |
| ] | |
| timeframes = ['5s', '10s', '15s', '30s', '1m', '2m', '5m'] | |
| platform = st.selectbox("π± Select Platform", platforms) | |
| currency = st.selectbox("π± Select Currency Pair", currency_pairs) | |
| timeframe = st.selectbox("β± Select Timeframe", timeframes) | |
| if st.button("π GET SIGNAL"): | |
| # Show spinner for a short time before signal | |
| with st.spinner("π Generating signal... Please wait"): | |
| time.sleep(1.5) | |
| signal = random.choice(["BUY", "SELL"]) | |
| countdown = random.randint(10, 30) | |
| st.success(f"β Signal generated: **{signal}**") | |
| # Countdown display | |
| placeholder = st.empty() | |
| for i in range(countdown, 0, -1): | |
| placeholder.markdown( | |
| f"<div style='text-align:center;color:#00FFFF;font-size:18px;'>Next in <b>{i}</b> seconds β³</div>", | |
| unsafe_allow_html=True | |
| ) | |
| time.sleep(1) | |
| placeholder.markdown( | |
| "<div style='text-align:center;color:gray;font-size:16px;'>Next signal available now β </div>", | |
| unsafe_allow_html=True | |
| ) | |
| # Show signal | |
| if signal == "BUY": | |
| st.markdown( | |
| "<div style='color:lime;font-size:40px;text-align:center;font-weight:bold;'>BUY πΌ</div>", | |
| unsafe_allow_html=True, | |
| ) | |
| else: | |
| st.markdown( | |
| "<div style='color:red;font-size:40px;text-align:center;font-weight:bold;'>SELL π½</div>", | |
| unsafe_allow_html=True, | |
| ) |