(feat) initial base page

This commit is contained in:
Michael Feng
2023-07-22 09:37:09 -04:00
parent 813522acc8
commit 222c3e7f2e
3 changed files with 34 additions and 15 deletions

View File

@@ -19,6 +19,7 @@ dependencies:
- jupyter
- optuna
- optuna-dashboard
- pathlib
- streamlit-ace
- git+https://github.com/hummingbot/hbot-remote-client-py.git
- git+https://github.com/hummingbot/docker-manager.git

32
main.py
View File

@@ -1,19 +1,21 @@
import streamlit as st
from pathlib import Path
from page import Page
apptitle = "High Frequency Trading"
st.set_page_config(page_title=apptitle, page_icon="🦅", layout="wide")
st.title("Welcome!")
st.write("---")
st.code("💡 The purpose of this dashboard is to provide useful information for high frequency trading traders")
st.write("")
st.write("Watch this video to understand how the dashboard works! 🦅")
c1, c2, c3 = st.columns([1, 6, 1])
with c2:
st.video("https://youtu.be/l6PWbN2pDK8")
st.write("If you want to contribute, post your idea in #dev-channel of [hummingbot discord](https://discord.gg/CjxZtkrH)")
st.write("---")
class HummingbotDashboardPage(Page):
def __init__(self):
super().__init__("Hummingbot Dashboard", Path("README.md").read_text())
def write_page(self):
super().write_page()
st.code("💡 The purpose of this dashboard is to provide useful information for high frequency trading traders")
st.write("")
st.write("Watch this video to understand how the dashboard works! 🦅")
c1, c2, c3 = st.columns([1, 6, 1])
with c2:
st.video("https://youtu.be/l6PWbN2pDK8")
st.write("If you want to contribute, post your idea in #dev-channel of [hummingbot discord](https://discord.gg/CjxZtkrH)")
if __name__ == "__main__":
page = HummingbotDashboardPage()
page.write_page()

16
page.py Normal file
View File

@@ -0,0 +1,16 @@
import streamlit as st
class Page:
def __init__(self, title, description, icon="🦅", layout="wide"):
self.title = title
self.description = description
self.icon = icon
self.layout = layout
def write_page(self):
st.set_page_config(page_title=self.title, page_icon=self.icon, layout=self.layout)
st.title(self.title)
st.write("---")
with st.expander("About This Page"):
st.write(self.description)
st.write("---")