Instructions to use Comfy-Org/ace_step_1.5_ComfyUI_files with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusion Single File
How to use Comfy-Org/ace_step_1.5_ComfyUI_files with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Upload 2 files
#10
by Teddy026 - opened
- app. py (1).txt +161 -0
- requirement .txt +409 -0
app. py (1).txt
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
import pandas as pd
|
| 3 |
+
import numpy as np
|
| 4 |
+
import matplotlib.pyplot as plt
|
| 5 |
+
import io
|
| 6 |
+
|
| 7 |
+
def trading_dashboard(digit, bias, digit_bias_list, bias_file, digit_sequence):
|
| 8 |
+
# Bias interpretation + gauge zone
|
| 9 |
+
if bias < 30:
|
| 10 |
+
bias_msg = f"Bias {bias}% β Weak (Red Zone)"
|
| 11 |
+
gauge_color = "red"
|
| 12 |
+
elif 30 <= bias < 60:
|
| 13 |
+
bias_msg = f"Bias {bias}% β Moderate (Yellow Zone)"
|
| 14 |
+
gauge_color = "yellow"
|
| 15 |
+
else:
|
| 16 |
+
bias_msg = f"Bias {bias}% β Strong (Green Zone)"
|
| 17 |
+
gauge_color = "green"
|
| 18 |
+
|
| 19 |
+
# --- Bias Gauge Plot ---
|
| 20 |
+
fig_gauge, axg = plt.subplots(figsize=(4,1))
|
| 21 |
+
axg.barh(["Bias"], [bias], color=gauge_color)
|
| 22 |
+
axg.set_xlim(0,100)
|
| 23 |
+
axg.set_title("Bias Strength Gauge")
|
| 24 |
+
axg.set_xlabel("%")
|
| 25 |
+
for spine in axg.spines.values():
|
| 26 |
+
spine.set_visible(False)
|
| 27 |
+
|
| 28 |
+
# --- Digit Bias Analyzer (0β9 bar chart) ---
|
| 29 |
+
if bias_file is not None:
|
| 30 |
+
try:
|
| 31 |
+
df = pd.read_csv(bias_file) if bias_file.name.endswith(".csv") else pd.read_excel(bias_file)
|
| 32 |
+
digit_bias_values = df.iloc[0].values.tolist()[:10]
|
| 33 |
+
except Exception:
|
| 34 |
+
digit_bias_values = np.random.randint(0,100,10)
|
| 35 |
+
elif digit_bias_list is not None and len(digit_bias_list) == 10:
|
| 36 |
+
digit_bias_values = digit_bias_list
|
| 37 |
+
else:
|
| 38 |
+
digit_bias_values = np.random.randint(0,100,10)
|
| 39 |
+
|
| 40 |
+
fig_digits, axd = plt.subplots()
|
| 41 |
+
axd.bar(range(10), digit_bias_values, color="skyblue")
|
| 42 |
+
axd.set_xticks(range(10))
|
| 43 |
+
axd.set_xticklabels([str(i) for i in range(10)])
|
| 44 |
+
axd.set_title("Digit Bias Analyzer (0β9)")
|
| 45 |
+
axd.set_ylabel("Bias %")
|
| 46 |
+
|
| 47 |
+
# --- Digit Psychology Module ---
|
| 48 |
+
streaks = []
|
| 49 |
+
bias_summary = {}
|
| 50 |
+
if digit_sequence:
|
| 51 |
+
digits = [int(d) for d in str(digit_sequence) if d.isdigit()]
|
| 52 |
+
if digits:
|
| 53 |
+
# Streak awareness
|
| 54 |
+
current_streak = 1
|
| 55 |
+
for i in range(1, len(digits)):
|
| 56 |
+
if digits[i] == digits[i-1]:
|
| 57 |
+
current_streak += 1
|
| 58 |
+
else:
|
| 59 |
+
streaks.append((digits[i-1], current_streak))
|
| 60 |
+
current_streak = 1
|
| 61 |
+
streaks.append((digits[-1], current_streak))
|
| 62 |
+
|
| 63 |
+
# Bias summary (frequency %)
|
| 64 |
+
freq = pd.Series(digits).value_counts(normalize=True) * 100
|
| 65 |
+
bias_summary = freq.to_dict()
|
| 66 |
+
|
| 67 |
+
psychology_text = "π Digit Psychology Analysis\n\n"
|
| 68 |
+
if streaks:
|
| 69 |
+
psychology_text += "Streaks:\n" + "\n".join([f"Digit {d} β {s} times" for d,s in streaks]) + "\n\n"
|
| 70 |
+
if bias_summary:
|
| 71 |
+
psychology_text += "Bias Summary (%):\n" + "\n".join([f"Digit {d}: {round(p,1)}%" for d,p in bias_summary.items()]) + "\n\n"
|
| 72 |
+
psychology_text += "Checklist:\n- Bias > 30%\n- Streak awareness checked\n- Indicators aligned (MACD/RSI)\n- Candle confirmation done"
|
| 73 |
+
|
| 74 |
+
# Example market data
|
| 75 |
+
data = pd.DataFrame(np.random.randn(50, 3), columns=['Price', 'Volume', 'Signal'])
|
| 76 |
+
data['MACD'] = data['Price'].ewm(span=12).mean() - data['Price'].ewm(span=26).mean()
|
| 77 |
+
data['RSI'] = 100 - (100 / (1 + (data['Price'].diff().clip(lower=0).rolling(14).mean() /
|
| 78 |
+
data['Price'].diff().clip(upper=0).abs().rolling(14).mean())))
|
| 79 |
+
|
| 80 |
+
# Plot MACD
|
| 81 |
+
fig1, ax1 = plt.subplots()
|
| 82 |
+
ax1.plot(data['Price'], label="Price")
|
| 83 |
+
ax1.plot(data['MACD'], label="MACD", color="orange")
|
| 84 |
+
ax1.set_title("Price vs MACD")
|
| 85 |
+
ax1.legend()
|
| 86 |
+
|
| 87 |
+
# Plot RSI
|
| 88 |
+
fig2, ax2 = plt.subplots()
|
| 89 |
+
ax2.plot(data['RSI'], label="RSI", color="green")
|
| 90 |
+
ax2.axhline(70, linestyle="--", color="red")
|
| 91 |
+
ax2.axhline(30, linestyle="--", color="blue")
|
| 92 |
+
ax2.set_title("RSI Indicator")
|
| 93 |
+
ax2.legend()
|
| 94 |
+
|
| 95 |
+
# Checklist summary
|
| 96 |
+
checklist = [
|
| 97 |
+
"Bias > 30%",
|
| 98 |
+
"Even/Odd bias matches entry",
|
| 99 |
+
"Over/Under bias matches entry",
|
| 100 |
+
"Indicators aligned (MACD/RSI)",
|
| 101 |
+
"Final candle confirmation"
|
| 102 |
+
]
|
| 103 |
+
|
| 104 |
+
# Master Trading Board Poster text
|
| 105 |
+
poster = """
|
| 106 |
+
π Master Trading Board Poster
|
| 107 |
+
|
| 108 |
+
Bias Rules:
|
| 109 |
+
- Trade only if Bias > 30%
|
| 110 |
+
- Strong bias preferred (>60%)
|
| 111 |
+
|
| 112 |
+
Even/Odd Rules:
|
| 113 |
+
- Trade EVEN if bias favors even digits
|
| 114 |
+
- Trade ODD if bias favors odd digits
|
| 115 |
+
|
| 116 |
+
Over/Under Rules:
|
| 117 |
+
- Trade OVER if bias favors digits 5β9
|
| 118 |
+
- Trade UNDER if bias favors digits 0β4
|
| 119 |
+
|
| 120 |
+
Indicator Rules:
|
| 121 |
+
- MACD confirms trend
|
| 122 |
+
- RSI not overbought/oversold
|
| 123 |
+
- Candle pattern matches strategy
|
| 124 |
+
"""
|
| 125 |
+
|
| 126 |
+
# --- Export results to CSV ---
|
| 127 |
+
export_df = pd.DataFrame({
|
| 128 |
+
"Digit Bias Values": digit_bias_values,
|
| 129 |
+
"Checklist": checklist
|
| 130 |
+
})
|
| 131 |
+
buffer = io.StringIO()
|
| 132 |
+
export_df.to_csv(buffer, index=False)
|
| 133 |
+
buffer.seek(0)
|
| 134 |
+
|
| 135 |
+
return bias_msg, fig_gauge, fig_digits, fig1, fig2, checklist, poster, psychology_text, buffer
|
| 136 |
+
|
| 137 |
+
with gr.Blocks() as demo:
|
| 138 |
+
with gr.Row():
|
| 139 |
+
with gr.Column():
|
| 140 |
+
digit = gr.Number(label="Digit (0β9)")
|
| 141 |
+
bias = gr.Slider(0, 100, step=5, label="Bias %")
|
| 142 |
+
digit_bias_list = gr.Dataframe(headers=[str(i) for i in range(10)], row_count=1, col_count=10,
|
| 143 |
+
label="Digit Bias Input (0β9)", type="numpy")
|
| 144 |
+
bias_file = gr.File(label="Upload Bias Data (CSV/Excel)", file_types=[".csv", ".xlsx"])
|
| 145 |
+
digit_sequence = gr.Textbox(label="Digit Sequence (e.g. 1234555777)")
|
| 146 |
+
bias_out = gr.Textbox(label="Bias Interpretation")
|
| 147 |
+
gauge_plot = gr.Plot(label="Bias Gauge")
|
| 148 |
+
digit_bias_plot = gr.Plot(label="Digit Bias Analyzer")
|
| 149 |
+
macd_plot = gr.Plot(label="MACD Chart")
|
| 150 |
+
rsi_plot = gr.Plot(label="RSI Chart")
|
| 151 |
+
psychology_out = gr.Textbox(label="Digit Psychology")
|
| 152 |
+
download_out = gr.File(label="Download Results (CSV)")
|
| 153 |
+
with gr.Column():
|
| 154 |
+
checklist_out = gr.Label(label="Checklist")
|
| 155 |
+
poster_out = gr.Textbox(label="Master Trading Board Poster")
|
| 156 |
+
|
| 157 |
+
demo.load(trading_dashboard,
|
| 158 |
+
inputs=[digit, bias, digit_bias_list, bias_file, digit_sequence],
|
| 159 |
+
outputs=[bias_out, gauge_plot, digit_bias_plot, macd_plot, rsi_plot, checklist_out, poster_out, psychology_out, download_out])
|
| 160 |
+
|
| 161 |
+
demo.launch()
|
requirement .txt
ADDED
|
@@ -0,0 +1,409 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
app.py
|
| 2 |
+
|
| 3 |
+
`python
|
| 4 |
+
import streamlit as st
|
| 5 |
+
import pandas as pd
|
| 6 |
+
import numpy as np
|
| 7 |
+
import plotly.express as px
|
| 8 |
+
import matplotlib.pyplot as plt
|
| 9 |
+
from sklearn.linear_model import LinearRegression
|
| 10 |
+
|
| 11 |
+
Page setup
|
| 12 |
+
st.setpageconfig(
|
| 13 |
+
page_title="Morgan Trading Hub",
|
| 14 |
+
pageicon="assets/morganicon.png",
|
| 15 |
+
layout="wide"
|
| 16 |
+
)
|
| 17 |
+
|
| 18 |
+
Title and intro
|
| 19 |
+
st.title("π Morgan Trading Hub")
|
| 20 |
+
st.write("Digit Bias Analyzer | Psychology Analyzer | Performance Tracker")
|
| 21 |
+
|
| 22 |
+
--- Section 1: Digit Bias Analyzer ---
|
| 23 |
+
st.header("Digit Bias Analyzer")
|
| 24 |
+
digits = list(range(10))
|
| 25 |
+
frequency = np.random.randint(5, 20, size=10) # placeholder demo data
|
| 26 |
+
df = pd.DataFrame({"Digit": digits, "Frequency": frequency})
|
| 27 |
+
fig = px.bar(df, x="Digit", y="Frequency", title="Digit Bias Frequency")
|
| 28 |
+
st.plotlychart(fig, usecontainer_width=True)
|
| 29 |
+
|
| 30 |
+
--- Section 2: Psychology Analyzer ---
|
| 31 |
+
st.header("Psychology Analyzer")
|
| 32 |
+
st.write("This section will show MACD, RSI, and candle psychology insights.")
|
| 33 |
+
|
| 34 |
+
Example placeholder chart
|
| 35 |
+
x = np.linspace(0, 10, 100)
|
| 36 |
+
y = np.sin(x)
|
| 37 |
+
plt.plot(x, y)
|
| 38 |
+
st.pyplot(plt)
|
| 39 |
+
|
| 40 |
+
--- Section 3: Performance Tracker ---
|
| 41 |
+
st.header("Performance Tracker")
|
| 42 |
+
st.write("Track trading performance and discipline checklist here.")
|
| 43 |
+
performance_data = pd.DataFrame({
|
| 44 |
+
"Trade": ["Over 2", "Over 3", "Under 7", "Under 8"],
|
| 45 |
+
"Result": ["Win", "Loss", "Win", "Loss"]
|
| 46 |
+
})
|
| 47 |
+
st.table(performance_data)
|
| 48 |
+
|
| 49 |
+
Footer
|
| 50 |
+
st.markdown("---")
|
| 51 |
+
st.markdown("Morgan Prince | π 0793 487 816 | π°πͺ")
|
| 52 |
+
`app.py
|
| 53 |
+
|
| 54 |
+
`python
|
| 55 |
+
import streamlit as st
|
| 56 |
+
import pandas as pd
|
| 57 |
+
import numpy as np
|
| 58 |
+
import plotly.express as px
|
| 59 |
+
import matplotlib.pyplot as plt
|
| 60 |
+
from sklearn.linear_model import LinearRegression
|
| 61 |
+
|
| 62 |
+
Page setup
|
| 63 |
+
st.setpageconfig(
|
| 64 |
+
page_title="Morgan Trading Hub",
|
| 65 |
+
pageicon="assets/morganicon.png",
|
| 66 |
+
layout="wide"
|
| 67 |
+
)
|
| 68 |
+
|
| 69 |
+
Title and intro
|
| 70 |
+
st.title("π Morgan Trading Hub")
|
| 71 |
+
st.write("Digit Bias Analyzer | Psychology Analyzer | Performance Tracker")
|
| 72 |
+
|
| 73 |
+
--- Section 1: Digit Bias Analyzer ---
|
| 74 |
+
st.header("Digit Bias Analyzer")
|
| 75 |
+
digits = list(range(10))
|
| 76 |
+
frequency = np.random.randint(5, 20, size=10) # placeholder demo data
|
| 77 |
+
df = pd.DataFrame({"Digit": digits, "Frequency": frequency})
|
| 78 |
+
fig = px.bar(df, x="Digit", y="Frequency", title="Digit Bias Frequency")
|
| 79 |
+
st.plotlychart(fig, usecontainer_width=True)
|
| 80 |
+
|
| 81 |
+
--- Section 2: Psychology Analyzer ---
|
| 82 |
+
st.header("Psychology Analyzer")
|
| 83 |
+
st.write("This section will show MACD, RSI, and candle psychology insights.")
|
| 84 |
+
|
| 85 |
+
Example placeholder chart
|
| 86 |
+
x = np.linspace(0, 10, 100)
|
| 87 |
+
y = np.sin(x)
|
| 88 |
+
plt.plot(x, y)
|
| 89 |
+
st.pyplot(plt)
|
| 90 |
+
|
| 91 |
+
--- Section 3: Performance Tracker ---
|
| 92 |
+
st.header("Performance Tracker")
|
| 93 |
+
st.write("Track trading performance and discipline checklist here.")
|
| 94 |
+
performance_data = pd.DataFrame({
|
| 95 |
+
"Trade": ["Over 2", "Over 3", "Under 7", "Under 8"],
|
| 96 |
+
"Result": ["Win", "Loss", "Win", "Loss"]
|
| 97 |
+
})
|
| 98 |
+
st.table(performance_data)
|
| 99 |
+
|
| 100 |
+
Footer
|
| 101 |
+
st.markdown("---")
|
| 102 |
+
st.markdown("Morgan Prince | π 0793 487 816 | π°πͺ")
|
| 103 |
+
`app.py
|
| 104 |
+
|
| 105 |
+
`python
|
| 106 |
+
import streamlit as st
|
| 107 |
+
import pandas as pd
|
| 108 |
+
import numpy as np
|
| 109 |
+
import plotly.express as px
|
| 110 |
+
import matplotlib.pyplot as plt
|
| 111 |
+
from sklearn.linear_model import LinearRegression
|
| 112 |
+
|
| 113 |
+
Page setup
|
| 114 |
+
st.setpageconfig(
|
| 115 |
+
page_title="Morgan Trading Hub",
|
| 116 |
+
pageicon="assets/morganicon.png",
|
| 117 |
+
layout="wide"
|
| 118 |
+
)
|
| 119 |
+
|
| 120 |
+
Title and intro
|
| 121 |
+
st.title("π Morgan Trading Hub")
|
| 122 |
+
st.write("Digit Bias Analyzer | Psychology Analyzer | Performance Tracker")
|
| 123 |
+
|
| 124 |
+
--- Section 1: Digit Bias Analyzer ---
|
| 125 |
+
st.header("Digit Bias Analyzer")
|
| 126 |
+
digits = list(range(10))
|
| 127 |
+
frequency = np.random.randint(5, 20, size=10) # placeholder demo data
|
| 128 |
+
df = pd.DataFrame({"Digit": digits, "Frequency": frequency})
|
| 129 |
+
fig = px.bar(df, x="Digit", y="Frequency", title="Digit Bias Frequency")
|
| 130 |
+
st.plotlychart(fig, usecontainer_width=True)
|
| 131 |
+
|
| 132 |
+
--- Section 2: Psychology Analyzer ---
|
| 133 |
+
st.header("Psychology Analyzer")
|
| 134 |
+
st.write("This section will show MACD, RSI, and candle psychology insights.")
|
| 135 |
+
|
| 136 |
+
Example placeholder chart
|
| 137 |
+
x = np.linspace(0, 10, 100)
|
| 138 |
+
y = np.sin(x)
|
| 139 |
+
plt.plot(x, y)
|
| 140 |
+
st.pyplot(plt)
|
| 141 |
+
|
| 142 |
+
--- Section 3: Performance Tracker ---
|
| 143 |
+
st.header("Performance Tracker")
|
| 144 |
+
st.write("Track trading performance and discipline checklist here.")
|
| 145 |
+
performance_data = pd.DataFrame({
|
| 146 |
+
"Trade": ["Over 2", "Over 3", "Under 7", "Under 8"],
|
| 147 |
+
"Result": ["Win", "Loss", "Win", "Loss"]
|
| 148 |
+
})
|
| 149 |
+
st.table(performance_data)
|
| 150 |
+
|
| 151 |
+
Footer
|
| 152 |
+
st.markdown("---")
|
| 153 |
+
st.markdown("Morgan Prince | π 0793 487 816 | π°πͺ")
|
| 154 |
+
`app.py
|
| 155 |
+
|
| 156 |
+
`python
|
| 157 |
+
import streamlit as st
|
| 158 |
+
import pandas as pd
|
| 159 |
+
import numpy as np
|
| 160 |
+
import plotly.express as px
|
| 161 |
+
import matplotlib.pyplot as plt
|
| 162 |
+
from sklearn.linear_model import LinearRegression
|
| 163 |
+
|
| 164 |
+
Page setup
|
| 165 |
+
st.setpageconfig(
|
| 166 |
+
page_title="Morgan Trading Hub",
|
| 167 |
+
pageicon="assets/morganicon.png",
|
| 168 |
+
layout="wide"
|
| 169 |
+
)
|
| 170 |
+
|
| 171 |
+
Title and intro
|
| 172 |
+
st.title("π Morgan Trading Hub")
|
| 173 |
+
st.write("Digit Bias Analyzer | Psychology Analyzer | Performance Tracker")
|
| 174 |
+
|
| 175 |
+
--- Section 1: Digit Bias Analyzer ---
|
| 176 |
+
st.header("Digit Bias Analyzer")
|
| 177 |
+
digits = list(range(10))
|
| 178 |
+
frequency = np.random.randint(5, 20, size=10) # placeholder demo data
|
| 179 |
+
df = pd.DataFrame({"Digit": digits, "Frequency": frequency})
|
| 180 |
+
fig = px.bar(df, x="Digit", y="Frequency", title="Digit Bias Frequency")
|
| 181 |
+
st.plotlychart(fig, usecontainer_width=True)
|
| 182 |
+
|
| 183 |
+
--- Section 2: Psychology Analyzer ---
|
| 184 |
+
st.header("Psychology Analyzer")
|
| 185 |
+
st.write("This section will show MACD, RSI, and candle psychology insights.")
|
| 186 |
+
|
| 187 |
+
Example placeholder chart
|
| 188 |
+
x = np.linspace(0, 10, 100)
|
| 189 |
+
y = np.sin(x)
|
| 190 |
+
plt.plot(x, y)
|
| 191 |
+
st.pyplot(plt)
|
| 192 |
+
|
| 193 |
+
--- Section 3: Performance Tracker ---
|
| 194 |
+
st.header("Performance Tracker")
|
| 195 |
+
st.write("Track trading performance and discipline checklist here.")
|
| 196 |
+
performance_data = pd.DataFrame({
|
| 197 |
+
"Trade": ["Over 2", "Over 3", "Under 7", "Under 8"],
|
| 198 |
+
"Result": ["Win", "Loss", "Win", "Loss"]
|
| 199 |
+
})
|
| 200 |
+
st.table(performance_data)
|
| 201 |
+
|
| 202 |
+
Footer
|
| 203 |
+
st.markdown("---")
|
| 204 |
+
st.markdown("Morgan Prince | π 0793 487 816 | π°πͺ")
|
| 205 |
+
`app.py
|
| 206 |
+
|
| 207 |
+
`python
|
| 208 |
+
import streamlit as st
|
| 209 |
+
import pandas as pd
|
| 210 |
+
import numpy as np
|
| 211 |
+
import plotly.express as px
|
| 212 |
+
import matplotlib.pyplot as plt
|
| 213 |
+
from sklearn.linear_model import LinearRegression
|
| 214 |
+
|
| 215 |
+
Page setup
|
| 216 |
+
st.setpageconfig(
|
| 217 |
+
page_title="Morgan Trading Hub",
|
| 218 |
+
pageicon="assets/morganicon.png",
|
| 219 |
+
layout="wide"
|
| 220 |
+
)
|
| 221 |
+
|
| 222 |
+
Title and intro
|
| 223 |
+
st.title("π Morgan Trading Hub")
|
| 224 |
+
st.write("Digit Bias Analyzer | Psychology Analyzer | Performance Tracker")
|
| 225 |
+
|
| 226 |
+
--- Section 1: Digit Bias Analyzer ---
|
| 227 |
+
st.header("Digit Bias Analyzer")
|
| 228 |
+
digits = list(range(10))
|
| 229 |
+
frequency = np.random.randint(5, 20, size=10) # placeholder demo data
|
| 230 |
+
df = pd.DataFrame({"Digit": digits, "Frequency": frequency})
|
| 231 |
+
fig = px.bar(df, x="Digit", y="Frequency", title="Digit Bias Frequency")
|
| 232 |
+
st.plotlychart(fig, usecontainer_width=True)
|
| 233 |
+
|
| 234 |
+
--- Section 2: Psychology Analyzer ---
|
| 235 |
+
st.header("Psychology Analyzer")
|
| 236 |
+
st.write("This section will show MACD, RSI, and candle psychology insights.")
|
| 237 |
+
|
| 238 |
+
Example placeholder chart
|
| 239 |
+
x = np.linspace(0, 10, 100)
|
| 240 |
+
y = np.sin(x)
|
| 241 |
+
plt.plot(x, y)
|
| 242 |
+
st.pyplot(plt)
|
| 243 |
+
|
| 244 |
+
--- Section 3: Performance Tracker ---
|
| 245 |
+
st.header("Performance Tracker")
|
| 246 |
+
st.write("Track trading performance and discipline checklist here.")
|
| 247 |
+
performance_data = pd.DataFrame({
|
| 248 |
+
"Trade": ["Over 2", "Over 3", "Under 7", "Under 8"],
|
| 249 |
+
"Result": ["Win", "Loss", "Win", "Loss"]
|
| 250 |
+
})
|
| 251 |
+
st.table(performance_data)
|
| 252 |
+
|
| 253 |
+
Footer
|
| 254 |
+
st.markdown("---")
|
| 255 |
+
st.markdown("Morgan Prince | π 0793 487 816 | π°πͺ")
|
| 256 |
+
`app.py
|
| 257 |
+
|
| 258 |
+
`python
|
| 259 |
+
import streamlit as st
|
| 260 |
+
import pandas as pd
|
| 261 |
+
import numpy as np
|
| 262 |
+
import plotly.express as px
|
| 263 |
+
import matplotlib.pyplot as plt
|
| 264 |
+
from sklearn.linear_model import LinearRegression
|
| 265 |
+
|
| 266 |
+
Page setup
|
| 267 |
+
st.setpageconfig(
|
| 268 |
+
page_title="Morgan Trading Hub",
|
| 269 |
+
pageicon="assets/morganicon.png",
|
| 270 |
+
layout="wide"
|
| 271 |
+
)
|
| 272 |
+
|
| 273 |
+
Title and intro
|
| 274 |
+
st.title("π Morgan Trading Hub")
|
| 275 |
+
st.write("Digit Bias Analyzer | Psychology Analyzer | Performance Tracker")
|
| 276 |
+
|
| 277 |
+
--- Section 1: Digit Bias Analyzer ---
|
| 278 |
+
st.header("Digit Bias Analyzer")
|
| 279 |
+
digits = list(range(10))
|
| 280 |
+
frequency = np.random.randint(5, 20, size=10) # placeholder demo data
|
| 281 |
+
df = pd.DataFrame({"Digit": digits, "Frequency": frequency})
|
| 282 |
+
fig = px.bar(df, x="Digit", y="Frequency", title="Digit Bias Frequency")
|
| 283 |
+
st.plotlychart(fig, usecontainer_width=True)
|
| 284 |
+
|
| 285 |
+
--- Section 2: Psychology Analyzer ---
|
| 286 |
+
st.header("Psychology Analyzer")
|
| 287 |
+
st.write("This section will show MACD, RSI, and candle psychology insights.")
|
| 288 |
+
|
| 289 |
+
Example placeholder chart
|
| 290 |
+
x = np.linspace(0, 10, 100)
|
| 291 |
+
y = np.sin(x)
|
| 292 |
+
plt.plot(x, y)
|
| 293 |
+
st.pyplot(plt)
|
| 294 |
+
|
| 295 |
+
--- Section 3: Performance Tracker ---
|
| 296 |
+
st.header("Performance Tracker")
|
| 297 |
+
st.write("Track trading performance and discipline checklist here.")
|
| 298 |
+
performance_data = pd.DataFrame({
|
| 299 |
+
"Trade": ["Over 2", "Over 3", "Under 7", "Under 8"],
|
| 300 |
+
"Result": ["Win", "Loss", "Win", "Loss"]
|
| 301 |
+
})
|
| 302 |
+
st.table(performance_data)
|
| 303 |
+
|
| 304 |
+
Footer
|
| 305 |
+
st.markdown("---")
|
| 306 |
+
st.markdown("Morgan Prince | π 0793 487 816 | π°πͺ")
|
| 307 |
+
`app.py
|
| 308 |
+
|
| 309 |
+
`python
|
| 310 |
+
import streamlit as st
|
| 311 |
+
import pandas as pd
|
| 312 |
+
import numpy as np
|
| 313 |
+
import plotly.express as px
|
| 314 |
+
import matplotlib.pyplot as plt
|
| 315 |
+
from sklearn.linear_model import LinearRegression
|
| 316 |
+
|
| 317 |
+
Page setup
|
| 318 |
+
st.setpageconfig(
|
| 319 |
+
page_title="Morgan Trading Hub",
|
| 320 |
+
pageicon="assets/morganicon.png",
|
| 321 |
+
layout="wide"
|
| 322 |
+
)
|
| 323 |
+
|
| 324 |
+
Title and intro
|
| 325 |
+
st.title("π Morgan Trading Hub")
|
| 326 |
+
st.write("Digit Bias Analyzer | Psychology Analyzer | Performance Tracker")
|
| 327 |
+
|
| 328 |
+
--- Section 1: Digit Bias Analyzer ---
|
| 329 |
+
st.header("Digit Bias Analyzer")
|
| 330 |
+
digits = list(range(10))
|
| 331 |
+
frequency = np.random.randint(5, 20, size=10) # placeholder demo data
|
| 332 |
+
df = pd.DataFrame({"Digit": digits, "Frequency": frequency})
|
| 333 |
+
fig = px.bar(df, x="Digit", y="Frequency", title="Digit Bias Frequency")
|
| 334 |
+
st.plotlychart(fig, usecontainer_width=True)
|
| 335 |
+
|
| 336 |
+
--- Section 2: Psychology Analyzer ---
|
| 337 |
+
st.header("Psychology Analyzer")
|
| 338 |
+
st.write("This section will show MACD, RSI, and candle psychology insights.")
|
| 339 |
+
|
| 340 |
+
Example placeholder chart
|
| 341 |
+
x = np.linspace(0, 10, 100)
|
| 342 |
+
y = np.sin(x)
|
| 343 |
+
plt.plot(x, y)
|
| 344 |
+
st.pyplot(plt)
|
| 345 |
+
|
| 346 |
+
--- Section 3: Performance Tracker ---
|
| 347 |
+
st.header("Performance Tracker")
|
| 348 |
+
st.write("Track trading performance and discipline checklist here.")
|
| 349 |
+
performance_data = pd.DataFrame({
|
| 350 |
+
"Trade": ["Over 2", "Over 3", "Under 7", "Under 8"],
|
| 351 |
+
"Result": ["Win", "Loss", "Win", "Loss"]
|
| 352 |
+
})
|
| 353 |
+
st.table(performance_data)
|
| 354 |
+
|
| 355 |
+
Footer
|
| 356 |
+
st.markdown("---")
|
| 357 |
+
st.markdown("Morgan Prince | π 0793 487 816 | π°πͺ")
|
| 358 |
+
`app.py
|
| 359 |
+
|
| 360 |
+
`python
|
| 361 |
+
import streamlit as st
|
| 362 |
+
import pandas as pd
|
| 363 |
+
import numpy as np
|
| 364 |
+
import plotly.express as px
|
| 365 |
+
import matplotlib.pyplot as plt
|
| 366 |
+
from sklearn.linear_model import LinearRegression
|
| 367 |
+
|
| 368 |
+
Page setup
|
| 369 |
+
st.setpageconfig(
|
| 370 |
+
page_title="Morgan Trading Hub",
|
| 371 |
+
pageicon="assets/morganicon.png",
|
| 372 |
+
layout="wide"
|
| 373 |
+
)
|
| 374 |
+
|
| 375 |
+
Title and intro
|
| 376 |
+
st.title("π Morgan Trading Hub")
|
| 377 |
+
st.write("Digit Bias Analyzer | Psychology Analyzer | Performance Tracker")
|
| 378 |
+
|
| 379 |
+
--- Section 1: Digit Bias Analyzer ---
|
| 380 |
+
st.header("Digit Bias Analyzer")
|
| 381 |
+
digits = list(range(10))
|
| 382 |
+
frequency = np.random.randint(5, 20, size=10) # placeholder demo data
|
| 383 |
+
df = pd.DataFrame({"Digit": digits, "Frequency": frequency})
|
| 384 |
+
fig = px.bar(df, x="Digit", y="Frequency", title="Digit Bias Frequency")
|
| 385 |
+
st.plotlychart(fig, usecontainer_width=True)
|
| 386 |
+
|
| 387 |
+
--- Section 2: Psychology Analyzer ---
|
| 388 |
+
st.header("Psychology Analyzer")
|
| 389 |
+
st.write("This section will show MACD, RSI, and candle psychology insights.")
|
| 390 |
+
|
| 391 |
+
Example placeholder chart
|
| 392 |
+
x = np.linspace(0, 10, 100)
|
| 393 |
+
y = np.sin(x)
|
| 394 |
+
plt.plot(x, y)
|
| 395 |
+
st.pyplot(plt)
|
| 396 |
+
|
| 397 |
+
--- Section 3: Performance Tracker ---
|
| 398 |
+
st.header("Performance Tracker")
|
| 399 |
+
st.write("Track trading performance and discipline checklist here.")
|
| 400 |
+
performance_data = pd.DataFrame({
|
| 401 |
+
"Trade": ["Over 2", "Over 3", "Under 7", "Under 8"],
|
| 402 |
+
"Result": ["Win", "Loss", "Win", "Loss"]
|
| 403 |
+
})
|
| 404 |
+
st.table(performance_data)
|
| 405 |
+
|
| 406 |
+
Footer
|
| 407 |
+
st.markdown("---")
|
| 408 |
+
st.markdown("Morgan Prince | π 0793 487 816 | π°πͺ")
|
| 409 |
+
`
|