Umerpy commited on
Commit
d32fcea
·
verified ·
1 Parent(s): 64db266

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -2,11 +2,15 @@ import streamlit as st
2
  import random
3
  import time
4
  import os
 
 
5
 
6
- st.set_page_config(page_title="UZAIR FOREX CLUB", layout="centered")
 
 
 
7
 
8
- # Get image path
9
- image_path = os.path.join(os.getcwd(), "static", "mylogo.png")
10
 
11
  st.markdown(
12
  f"""
@@ -15,7 +19,7 @@ st.markdown(
15
  background:linear-gradient(to bottom right,#dc2626,#7f1d1d);
16
  display:flex;align-items:center;justify-content:center;
17
  margin:auto;border:4px solid white;overflow:hidden;">
18
- <img src="file://{image_path}"
19
  style="width:90%;height:90%;object-fit:cover;border-radius:50%;" />
20
  </div>
21
  <h1 style="
@@ -34,6 +38,7 @@ st.markdown(
34
  )
35
 
36
 
 
37
  platforms = ['QUOTEX', 'POCKET OPTION', 'BINOMO', 'OLYMP', 'IQ OPTION', 'EXPERT OPTION']
38
  currency_pairs = [
39
  'USD/BRL (OTC)', 'USD/BRL (CTC)', 'USD/ARS (OTC)', 'USD/DZD (OTC)',
 
2
  import random
3
  import time
4
  import os
5
+ import streamlit as st
6
+ import base64
7
 
8
+ # Convert image to base64 (so it works perfectly inside HTML)
9
+ def get_base64_image(image_path):
10
+ with open(image_path, "rb") as img_file:
11
+ return base64.b64encode(img_file.read()).decode()
12
 
13
+ image_base64 = get_base64_image("static/mylogo.png")
 
14
 
15
  st.markdown(
16
  f"""
 
19
  background:linear-gradient(to bottom right,#dc2626,#7f1d1d);
20
  display:flex;align-items:center;justify-content:center;
21
  margin:auto;border:4px solid white;overflow:hidden;">
22
+ <img src="data:image/png;base64,{image_base64}"
23
  style="width:90%;height:90%;object-fit:cover;border-radius:50%;" />
24
  </div>
25
  <h1 style="
 
38
  )
39
 
40
 
41
+
42
  platforms = ['QUOTEX', 'POCKET OPTION', 'BINOMO', 'OLYMP', 'IQ OPTION', 'EXPERT OPTION']
43
  currency_pairs = [
44
  'USD/BRL (OTC)', 'USD/BRL (CTC)', 'USD/ARS (OTC)', 'USD/DZD (OTC)',