Owos commited on
Commit
2359bef
β€’
1 Parent(s): c06d96e

changed color

Browse files
.streamlit/config.toml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ [theme]
2
+ primaryColor = "#E694FF"
3
+ backgroundColor = "#DCDCDC"
4
+ secondaryBackgroundColor = "#0083B8"
5
+ textColor = "#00172B"
6
+ font = "sans-serif"
__pycache__/styling.cpython-39.pyc ADDED
Binary file (1.92 kB). View file
 
app.py CHANGED
@@ -4,6 +4,7 @@ import numpy as np
4
  import threading
5
  import torch
6
  import numpy as np
 
7
  from transformers import AutoTokenizer, AutoModelWithLMHead
8
  from huggingface_hub import HfApi, hf_hub_download
9
  from torch.utils.data import Dataset, DataLoader
@@ -16,12 +17,13 @@ st.set_page_config(
16
  st.markdown(
17
  """
18
 
19
- # Koya recommeder System
20
  ### πŸ‘‹ Welcome to the to the Koya recommendation system. This system recommeds an LLM for you when you provide a sample sentence in your target language and select a list of models.
21
- You can try it below"""
22
  )
23
 
24
 
 
25
  @st.cache
26
  def get_model_infos(multilingual="multilingual"):
27
  api = HfApi()
@@ -207,6 +209,9 @@ def set_seed():
207
  np.random.seed(2023)
208
  torch.manual_seed(2023)
209
 
 
 
 
210
 
211
  sentence = st.text_input("Please input a sample sentence in the target language")
212
 
 
4
  import threading
5
  import torch
6
  import numpy as np
7
+ from styling import footer
8
  from transformers import AutoTokenizer, AutoModelWithLMHead
9
  from huggingface_hub import HfApi, hf_hub_download
10
  from torch.utils.data import Dataset, DataLoader
 
17
  st.markdown(
18
  """
19
 
20
+ # Koya Recommeder System
21
  ### πŸ‘‹ Welcome to the to the Koya recommendation system. This system recommeds an LLM for you when you provide a sample sentence in your target language and select a list of models.
22
+ You can try it below \n\n\n"""
23
  )
24
 
25
 
26
+
27
  @st.cache
28
  def get_model_infos(multilingual="multilingual"):
29
  api = HfApi()
 
209
  np.random.seed(2023)
210
  torch.manual_seed(2023)
211
 
212
+ with st.sidebar:
213
+ st.selectbox("df", [1,2,3,4])
214
+ footer()
215
 
216
  sentence = st.text_input("Please input a sample sentence in the target language")
217
 
styling.py ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from htbuilder import HtmlElement, div, ul, li, br, hr, a, p, img, styles, classes, fonts
3
+ from htbuilder.units import percent, px
4
+ from htbuilder.funcs import rgba, rgb
5
+
6
+
7
+
8
+ #footer
9
+ def image(src_as_string, **style):
10
+ return img(src=src_as_string, style=styles(**style))
11
+
12
+
13
+ def link(link, text, **style):
14
+ return a(_href=link, _target="_blank", style=styles(**style))(text)
15
+
16
+
17
+ def layout(*args):
18
+
19
+ style = """
20
+ <style>
21
+ # MainMenu {visibility: hidden;}
22
+ footer {visibility: hidden;}
23
+ .stApp { bottom: 105px; }
24
+ </style>
25
+ """
26
+
27
+ style_div = styles(
28
+ position="fixed",
29
+ left=0,
30
+ bottom=0,
31
+ margin=px(0, 0, 0, 0),
32
+ width=percent(100),
33
+ color="black",
34
+ text_align="center",
35
+ height="auto",
36
+ opacity=1
37
+ )
38
+
39
+ style_hr = styles(
40
+ display="block",
41
+ margin=px(8, 8, "auto", "auto"),
42
+ border_style="inset",
43
+ border_width=px(2)
44
+ )
45
+
46
+ body = p()
47
+ foot = div(
48
+ style=style_div
49
+ )(
50
+ hr(
51
+ style=style_hr
52
+ ),
53
+ body
54
+ )
55
+
56
+ st.markdown(style, unsafe_allow_html=True)
57
+
58
+ for arg in args:
59
+ if isinstance(arg, str):
60
+ body(arg)
61
+
62
+ elif isinstance(arg, HtmlElement):
63
+ body(arg)
64
+
65
+ st.markdown(str(foot), unsafe_allow_html=True)
66
+
67
+
68
+ def footer():
69
+ myargs = [
70
+ " with ❀️ by ",
71
+ link("https://twitter.com/AbrahamOwos", "@AbrahamOwos "), "and ", link("https://twitter.com/AbrahamOwos", "@Chrisjay"),
72
+ br(),
73
+ " βš™οΈ Have a suggestion? Hit us up" ,
74
+ ]
75
+ layout(*myargs)