Umerpy commited on
Commit
94cb742
Β·
verified Β·
1 Parent(s): 8ca2fde

Update frontend/streamlit_app.py

Browse files
Files changed (1) hide show
  1. frontend/streamlit_app.py +157 -157
frontend/streamlit_app.py CHANGED
@@ -1,157 +1,157 @@
1
- # import streamlit as st
2
- # import random
3
- # import time
4
-
5
- # st.set_page_config(page_title="Uzair Forex Club", layout="centered")
6
-
7
- # # --- Header ---
8
- # st.markdown(
9
- # """
10
- # <div style="text-align:center;">
11
- # <div style="width:100px;height:100px;border-radius:50%;
12
- # background:linear-gradient(to bottom right,#dc2626,#7f1d1d);
13
- # display:flex;align-items:center;justify-content:center;
14
- # margin:auto;border:4px solid white;overflow:hidden;">
15
- # <img src="http://127.0.0.1:8000/static/mylogo.png"
16
- # style="width:90%;height:90%;object-fit:cover;border-radius:50%;" />
17
- # </div>
18
- # <h1 style="
19
- # color:#FFD700; /* gold color */
20
- # font-family:'Poppins', sans-serif;
21
- # font-size:40px;
22
- # letter-spacing:5px;
23
- # margin-top:10px;
24
- # text-shadow:2px 2px 6px rgba(0,0,0,0.5);
25
- # ">
26
- # Uzair Forex Club
27
- # </h1>
28
- # </div>
29
- # """,
30
- # unsafe_allow_html=True
31
- # )
32
-
33
- # # --- Platform Selector ---
34
- # platforms = ['QUOTEX', 'POCKET OPTION', 'BINOMO', 'OLYMP', 'IQ OPTION', 'EXPERT OPTION']
35
- # platform = st.selectbox("πŸ“± Select Platform", platforms)
36
-
37
- # # --- Currency Pair Selector ---
38
- # currency_pairs = [
39
- # 'USD/BRL (OTC)', 'USD/BRL (CTC)', 'USD/ARS (OTC)', 'USD/DZD (OTC)',
40
- # 'USD/COP (OTC)', 'CAD/CHF (OTC)', 'USD/BDT (OTC)', 'USD/PKR (OTC)'
41
- # ]
42
- # currency = st.selectbox("πŸ’± Select Currency Pair", currency_pairs)
43
-
44
- # # --- Timeframe Selector ---
45
- # timeframes = ['5s', '10s', '15s', '30s', '1m', '2m','5m']
46
- # timeframe = st.selectbox("⏱ Select Timeframe", timeframes)
47
-
48
- # # --- Signal Generation ---
49
- # if st.button("πŸš€ GET SIGNAL"):
50
- # with st.spinner("Generating signal..."):
51
- # time.sleep(1)
52
- # signal = random.choice(["BUY", "SELL"])
53
- # countdown = random.randint(10, 30)
54
- # st.success(f"**Signal:** {signal}")
55
-
56
- # placeholder = st.empty() # Create an area to update countdown
57
-
58
- # # Countdown loop
59
- # for i in range(countdown, 0, -1):
60
- # placeholder.markdown(
61
- # f"<div style='text-align:center;color:#00FFFF;font-size:18px;'>Next in <b>{i}</b> seconds ⏳</div>",
62
- # unsafe_allow_html=True
63
- # )
64
- # time.sleep(1)
65
-
66
- # placeholder.markdown(
67
- # "<div style='text-align:center;color:gray;font-size:16px;'>Next signal available now βœ…</div>",
68
- # unsafe_allow_html=True
69
- # )
70
-
71
- # # Show signal
72
- # if signal == "BUY":
73
- # st.markdown(
74
- # "<div style='color:lime;font-size:40px;text-align:center;font-weight:bold;'>BUY πŸ”Ό</div>",
75
- # unsafe_allow_html=True,
76
- # )
77
- # else:
78
- # st.markdown(
79
- # "<div style='color:red;font-size:40px;text-align:center;font-weight:bold;'>SELL πŸ”½</div>",
80
- # unsafe_allow_html=True,
81
- # )
82
-
83
- import streamlit as st
84
- import random
85
- import time
86
-
87
- st.set_page_config(page_title="Uzair Forex Club", layout="centered")
88
-
89
- st.markdown(
90
- """
91
- <div style="text-align:center;">
92
- <div style="width:100px;height:100px;border-radius:50%;
93
- background:linear-gradient(to bottom right,#dc2626,#7f1d1d);
94
- display:flex;align-items:center;justify-content:center;
95
- margin:auto;border:4px solid white;overflow:hidden;">
96
- <img src="http://127.0.0.1:8000/static/mylogo.png"
97
- style="width:90%;height:90%;object-fit:cover;border-radius:50%;" />
98
- </div>
99
- <h1 style="
100
- color:#FFD700; /* gold color */
101
- font-family:'Poppins', sans-serif;
102
- font-size:40px;
103
- letter-spacing:5px;
104
- margin-top:10px;
105
- text-shadow:2px 2px 6px rgba(0,0,0,0.5);
106
- ">
107
- Uzair Forex Club
108
- </h1>
109
- </div>
110
- """,
111
- unsafe_allow_html=True
112
- )
113
-
114
- platforms = ['QUOTEX', 'POCKET OPTION', 'BINOMO', 'OLYMP', 'IQ OPTION', 'EXPERT OPTION']
115
- currency_pairs = [
116
- 'USD/BRL (OTC)', 'USD/BRL (CTC)', 'USD/ARS (OTC)', 'USD/DZD (OTC)',
117
- 'USD/COP (OTC)', 'CAD/CHF (OTC)', 'USD/BDT (OTC)', 'USD/PKR (OTC)'
118
- ]
119
- timeframes = ['5s', '10s', '15s', '30s', '1m', '2m', '5m']
120
-
121
- platform = st.selectbox("πŸ“± Select Platform", platforms)
122
- currency = st.selectbox("πŸ’± Select Currency Pair", currency_pairs)
123
- timeframe = st.selectbox("⏱ Select Timeframe", timeframes)
124
-
125
- if st.button("πŸš€ GET SIGNAL"):
126
- # Show spinner for a short time before signal
127
- with st.spinner("πŸ” Generating signal... Please wait"):
128
- time.sleep(1.5)
129
- signal = random.choice(["BUY", "SELL"])
130
- countdown = random.randint(10, 30)
131
-
132
- st.success(f"βœ… Signal generated: **{signal}**")
133
-
134
- # Countdown display
135
- placeholder = st.empty()
136
- for i in range(countdown, 0, -1):
137
- placeholder.markdown(
138
- f"<div style='text-align:center;color:#00FFFF;font-size:18px;'>Next in <b>{i}</b> seconds ⏳</div>",
139
- unsafe_allow_html=True
140
- )
141
- time.sleep(1)
142
- placeholder.markdown(
143
- "<div style='text-align:center;color:gray;font-size:16px;'>Next signal available now βœ…</div>",
144
- unsafe_allow_html=True
145
- )
146
-
147
- # Show signal
148
- if signal == "BUY":
149
- st.markdown(
150
- "<div style='color:lime;font-size:40px;text-align:center;font-weight:bold;'>BUY πŸ”Ό</div>",
151
- unsafe_allow_html=True,
152
- )
153
- else:
154
- st.markdown(
155
- "<div style='color:red;font-size:40px;text-align:center;font-weight:bold;'>SELL πŸ”½</div>",
156
- unsafe_allow_html=True,
157
- )
 
1
+ # import streamlit as st
2
+ # import random
3
+ # import time
4
+
5
+ # st.set_page_config(page_title="Uzair Forex Club", layout="centered")
6
+
7
+ # # --- Header ---
8
+ # st.markdown(
9
+ # """
10
+ # <div style="text-align:center;">
11
+ # <div style="width:100px;height:100px;border-radius:50%;
12
+ # background:linear-gradient(to bottom right,#dc2626,#7f1d1d);
13
+ # display:flex;align-items:center;justify-content:center;
14
+ # margin:auto;border:4px solid white;overflow:hidden;">
15
+ # <img src="http://127.0.0.1:8000/static/mylogo.png"
16
+ # style="width:90%;height:90%;object-fit:cover;border-radius:50%;" />
17
+ # </div>
18
+ # <h1 style="
19
+ # color:#FFD700; /* gold color */
20
+ # font-family:'Poppins', sans-serif;
21
+ # font-size:40px;
22
+ # letter-spacing:5px;
23
+ # margin-top:10px;
24
+ # text-shadow:2px 2px 6px rgba(0,0,0,0.5);
25
+ # ">
26
+ # Uzair Forex Club
27
+ # </h1>
28
+ # </div>
29
+ # """,
30
+ # unsafe_allow_html=True
31
+ # )
32
+
33
+ # # --- Platform Selector ---
34
+ # platforms = ['QUOTEX', 'POCKET OPTION', 'BINOMO', 'OLYMP', 'IQ OPTION', 'EXPERT OPTION']
35
+ # platform = st.selectbox("πŸ“± Select Platform", platforms)
36
+
37
+ # # --- Currency Pair Selector ---
38
+ # currency_pairs = [
39
+ # 'USD/BRL (OTC)', 'USD/BRL (CTC)', 'USD/ARS (OTC)', 'USD/DZD (OTC)',
40
+ # 'USD/COP (OTC)', 'CAD/CHF (OTC)', 'USD/BDT (OTC)', 'USD/PKR (OTC)'
41
+ # ]
42
+ # currency = st.selectbox("πŸ’± Select Currency Pair", currency_pairs)
43
+
44
+ # # --- Timeframe Selector ---
45
+ # timeframes = ['5s', '10s', '15s', '30s', '1m', '2m','5m']
46
+ # timeframe = st.selectbox("⏱ Select Timeframe", timeframes)
47
+
48
+ # # --- Signal Generation ---
49
+ # if st.button("πŸš€ GET SIGNAL"):
50
+ # with st.spinner("Generating signal..."):
51
+ # time.sleep(1)
52
+ # signal = random.choice(["BUY", "SELL"])
53
+ # countdown = random.randint(10, 30)
54
+ # st.success(f"**Signal:** {signal}")
55
+
56
+ # placeholder = st.empty() # Create an area to update countdown
57
+
58
+ # # Countdown loop
59
+ # for i in range(countdown, 0, -1):
60
+ # placeholder.markdown(
61
+ # f"<div style='text-align:center;color:#00FFFF;font-size:18px;'>Next in <b>{i}</b> seconds ⏳</div>",
62
+ # unsafe_allow_html=True
63
+ # )
64
+ # time.sleep(1)
65
+
66
+ # placeholder.markdown(
67
+ # "<div style='text-align:center;color:gray;font-size:16px;'>Next signal available now βœ…</div>",
68
+ # unsafe_allow_html=True
69
+ # )
70
+
71
+ # # Show signal
72
+ # if signal == "BUY":
73
+ # st.markdown(
74
+ # "<div style='color:lime;font-size:40px;text-align:center;font-weight:bold;'>BUY πŸ”Ό</div>",
75
+ # unsafe_allow_html=True,
76
+ # )
77
+ # else:
78
+ # st.markdown(
79
+ # "<div style='color:red;font-size:40px;text-align:center;font-weight:bold;'>SELL πŸ”½</div>",
80
+ # unsafe_allow_html=True,
81
+ # )
82
+
83
+ import streamlit as st
84
+ import random
85
+ import time
86
+
87
+ st.set_page_config(page_title="Uzair Forex Club", layout="centered")
88
+
89
+ st.markdown(
90
+ """
91
+ <div style="text-align:center;">
92
+ <div style="width:100px;height:100px;border-radius:50%;
93
+ background:linear-gradient(to bottom right,#dc2626,#7f1d1d);
94
+ display:flex;align-items:center;justify-content:center;
95
+ margin:auto;border:4px solid white;overflow:hidden;">
96
+ <img src="http://127.0.0.1:8000/static/mylogo.png"
97
+ style="width:90%;height:90%;object-fit:cover;border-radius:50%;" />
98
+ </div>
99
+ <h1 style="
100
+ color:#FFD700; /* gold color */
101
+ font-family:'Poppins', sans-serif;
102
+ font-size:40px;
103
+ letter-spacing:5px;
104
+ margin-top:10px;
105
+ text-shadow:2px 2px 6px rgba(0,0,0,0.5);
106
+ ">
107
+ UZAIR FOREX CLUB
108
+ </h1>
109
+ </div>
110
+ """,
111
+ unsafe_allow_html=True
112
+ )
113
+
114
+ platforms = ['QUOTEX', 'POCKET OPTION', 'BINOMO', 'OLYMP', 'IQ OPTION', 'EXPERT OPTION']
115
+ currency_pairs = [
116
+ 'USD/BRL (OTC)', 'USD/BRL (CTC)', 'USD/ARS (OTC)', 'USD/DZD (OTC)',
117
+ 'USD/COP (OTC)', 'CAD/CHF (OTC)', 'USD/BDT (OTC)', 'USD/PKR (OTC)'
118
+ ]
119
+ timeframes = ['5s', '10s', '15s', '30s', '1m', '2m', '5m']
120
+
121
+ platform = st.selectbox("πŸ“± Select Platform", platforms)
122
+ currency = st.selectbox("πŸ’± Select Currency Pair", currency_pairs)
123
+ timeframe = st.selectbox("⏱ Select Timeframe", timeframes)
124
+
125
+ if st.button("πŸš€ GET SIGNAL"):
126
+ # Show spinner for a short time before signal
127
+ with st.spinner("πŸ” Generating signal... Please wait"):
128
+ time.sleep(1.5)
129
+ signal = random.choice(["BUY", "SELL"])
130
+ countdown = random.randint(10, 30)
131
+
132
+ st.success(f"βœ… Signal generated: **{signal}**")
133
+
134
+ # Countdown display
135
+ placeholder = st.empty()
136
+ for i in range(countdown, 0, -1):
137
+ placeholder.markdown(
138
+ f"<div style='text-align:center;color:#00FFFF;font-size:18px;'>Next in <b>{i}</b> seconds ⏳</div>",
139
+ unsafe_allow_html=True
140
+ )
141
+ time.sleep(1)
142
+ placeholder.markdown(
143
+ "<div style='text-align:center;color:gray;font-size:16px;'>Next signal available now βœ…</div>",
144
+ unsafe_allow_html=True
145
+ )
146
+
147
+ # Show signal
148
+ if signal == "BUY":
149
+ st.markdown(
150
+ "<div style='color:lime;font-size:40px;text-align:center;font-weight:bold;'>BUY πŸ”Ό</div>",
151
+ unsafe_allow_html=True,
152
+ )
153
+ else:
154
+ st.markdown(
155
+ "<div style='color:red;font-size:40px;text-align:center;font-weight:bold;'>SELL πŸ”½</div>",
156
+ unsafe_allow_html=True,
157
+ )