justheuristic commited on
Commit
28f4b4e
1 Parent(s): e0eb063

tweak offsets

Browse files
Files changed (4) hide show
  1. app.py +22 -2
  2. charts.py +1 -0
  3. st_helpers.py +8 -2
  4. static/footer.html +15 -0
app.py CHANGED
@@ -6,7 +6,7 @@ If you're not a hedgehog, you shouldn't reuse this code. Use this instead: https
6
  import streamlit as st
7
 
8
 
9
- from st_helpers import make_header, content_text, content_title, cite
10
  from charts import draw_current_progress
11
 
12
  st.set_page_config(page_title="Training Transformers Together", layout="centered")
@@ -36,7 +36,27 @@ image-text-pair dataset with 400 million samples. Our model is based on
36
  <a target="_blank" rel="noopener noreferrer" href=https://github.com/lucidrains/DALLE-pytorch>dalle-pytorch</a>
37
  with several tweaks for memory-efficient training.""")
38
 
 
39
  content_title("How do I join?")
40
 
41
- content_text("For the sake of ")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
 
 
 
 
6
  import streamlit as st
7
 
8
 
9
+ from st_helpers import make_header, content_text, content_title, cite, make_footer
10
  from charts import draw_current_progress
11
 
12
  st.set_page_config(page_title="Training Transformers Together", layout="centered")
 
36
  <a target="_blank" rel="noopener noreferrer" href=https://github.com/lucidrains/DALLE-pytorch>dalle-pytorch</a>
37
  with several tweaks for memory-efficient training.""")
38
 
39
+
40
  content_title("How do I join?")
41
 
42
+ content_text("""
43
+ That's easy. First, make sure you're logged in at Hugging Face. If you don't have an account, create one <b>TODO</b>.<br>
44
+
45
+ <ul style="text-align: left; list-style-position: inside; margin-top: 12px; margin-left: -32px;">
46
+ <li style="margin-top: 4px;">
47
+ Join our organization on Hugging Face here: <b>TODO</b>. </li>
48
+ <li style="margin-top: 4px;">
49
+ The simplest way to start is with colab <b>TODO</b>;</li>
50
+ <li style="margin-top: 4px;">
51
+ You can find other starter kits, evaluation and inference notebooks <b>TODO IN OUR ORGANIZATION</b>;</li>
52
+ <li style="margin-top: 4px;">
53
+ If you have any issues, <b>TODO DISCORD BADGE</b> </li>
54
+ </ul>
55
+
56
+ Please note that we currently limit the number of colab participants to <b>TODO</b> to make sure we do not interfere
57
+ with other users. If there are too many active peers, take a look at alternative starter kits here <b>TODO</b>
58
+ """)
59
+
60
 
61
+ content_text("<b> TODO UPDATE")
62
+ make_footer()
charts.py CHANGED
@@ -39,6 +39,7 @@ def draw_current_progress():
39
  use_container_width=True,
40
  )
41
 
 
42
  def draw_participant_bubbles():
43
  with st.expander("Who's training?", expanded=False):
44
  st.markdown("### Collaborative training participants\n(may take a few seconds to load)")
 
39
  use_container_width=True,
40
  )
41
 
42
+
43
  def draw_participant_bubbles():
44
  with st.expander("Who's training?", expanded=False):
45
  st.markdown("### Collaborative training participants\n(may take a few seconds to load)")
st_helpers.py CHANGED
@@ -4,21 +4,27 @@ import streamlit.components.v1 as components
4
  with open("static/header.html", 'r', encoding='utf-8') as f:
5
  header_html = f.read()
6
  with open("static/header_style.css", 'r', encoding='utf-8') as f:
7
- header_style_css = f.read()
8
  with open("static/header_animate.js") as f:
9
  header_animate_js = f.read()
10
  with open("static/content_style.css", 'r', encoding='utf-8') as f:
11
  content_style_css = f.read()
12
  with open("static/meta.html", 'r', encoding='utf-8') as f:
13
  meta_html = f.read()
 
 
14
 
15
 
16
  def make_header():
17
- components.html(f"<style>{header_style_css}</style>{header_html}<script>{header_animate_js}</script>", height=260)
18
  st.markdown(meta_html, unsafe_allow_html=True)
19
  st.markdown(f"<style>{content_style_css}</style>", unsafe_allow_html=True) # apply css to the rest of the document
20
 
21
 
 
 
 
 
22
  def content_title(title: str, vspace_before: int = 0, vspace_after: int = 0):
23
  st.markdown(f'<center><div class="padded faded demo_title" '
24
  f'style="padding-top: {vspace_before}px; padding-bottom: {vspace_after}px; text-align: justify;">'
 
4
  with open("static/header.html", 'r', encoding='utf-8') as f:
5
  header_html = f.read()
6
  with open("static/header_style.css", 'r', encoding='utf-8') as f:
7
+ embeds_style_css = f.read()
8
  with open("static/header_animate.js") as f:
9
  header_animate_js = f.read()
10
  with open("static/content_style.css", 'r', encoding='utf-8') as f:
11
  content_style_css = f.read()
12
  with open("static/meta.html", 'r', encoding='utf-8') as f:
13
  meta_html = f.read()
14
+ with open("static/footer.html", 'r', encoding='utf-8') as f:
15
+ footer_html = f.read()
16
 
17
 
18
  def make_header():
19
+ components.html(f"<style>{embeds_style_css}</style>{header_html}<script>{header_animate_js}</script>", height=260)
20
  st.markdown(meta_html, unsafe_allow_html=True)
21
  st.markdown(f"<style>{content_style_css}</style>", unsafe_allow_html=True) # apply css to the rest of the document
22
 
23
 
24
+ def make_footer():
25
+ components.html(f"<style>{embeds_style_css}</style>{footer_html}", height=110)
26
+
27
+
28
  def content_title(title: str, vspace_before: int = 0, vspace_after: int = 0):
29
  st.markdown(f'<center><div class="padded faded demo_title" '
30
  f'style="padding-top: {vspace_before}px; padding-bottom: {vspace_after}px; text-align: justify;">'
static/footer.html ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div style="width: 260px; margin:0 auto;">
2
+ <div style="margin: 0 auto; margin-top: 0px;">
3
+ <a class="github-button" href="https://github.com/learning-at-home/hivemind" data-size="large" data-show-count="false" aria-label="Star learning-at-home/hivemind on GitHub">Code</a>
4
+ <div style="overflow: hidden; white-space: nowrap; margin: 0 auto; display: inline-block;">
5
+ <button onclick="window.open('https://arxiv.org/abs/2106.10207');"
6
+ class="arxiv_button">Paper</button>
7
+ </div>
8
+ <a href="https://twitter.com/intent/tweet?hashtags=neurips,joinhivemind&text=Join%20the%20deep%20learning%20hivemind!%0Atraining-transformers-together.github.io"
9
+ class="twitter-hashtag-button" data-show-count="true" data-size="large">Tweet</a>
10
+ <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
11
+
12
+ <script async defer src="https://buttons.github.io/buttons.js"></script>
13
+ </div>
14
+ <hr style="margin-bottom: 64px; width:0%; border: 0 solid white">
15
+ </div>