kargaranamir commited on
Commit
483cabe
•
1 Parent(s): 0a3d363
Files changed (2) hide show
  1. app.py +3 -1
  2. utils.py +13 -0
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import pandas as pd
2
  import streamlit as st
3
- from utils import nav_to, df_to_html, render_svg, combine_json_files
4
 
5
  data = combine_json_files('./languages')
6
 
@@ -87,6 +87,8 @@ def render_links_table(isocode):
87
 
88
  # show logo
89
  render_svg(open("assets/glotweb_logo.svg").read())
 
 
90
  st.text("")
91
 
92
 
 
1
  import pandas as pd
2
  import streamlit as st
3
+ from utils import nav_to, df_to_html, render_svg, combine_json_files, render_metadata
4
 
5
  data = combine_json_files('./languages')
6
 
 
87
 
88
  # show logo
89
  render_svg(open("assets/glotweb_logo.svg").read())
90
+ render_metadata()
91
+ st.markdown("**GlotWeb** is an indexing service for low-resource languages. It indexes sites or links written in each language. This list can be used to create raw text or parallel corpora and to study low-resource languages on the web.")
92
  st.text("")
93
 
94
 
utils.py CHANGED
@@ -68,3 +68,16 @@ def combine_json_files(folder_path):
68
  return combined_data
69
 
70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  return combined_data
69
 
70
 
71
+ @st.cache_data
72
+ def render_metadata():
73
+ """Renders the metadata."""
74
+ html = r"""<p align="center">
75
+ <a href="https://github.com/cisnlp/GlotWeb"><img alt="GlotWeb GitHub" src="https://img.shields.io/badge/📦 GlotWeb Git-ccccff"></a>
76
+ <a href="https://github.com/cisnlp/GlotSparse"><img alt="GlotSparse GitHub" src="https://img.shields.io/badge/📦 GlotSparse Git-f4c2c2"></a>
77
+ <a href="https://github.com/cisnlp/GlotLID"><img alt="GlotLID GitHub" src="https://img.shields.io/badge/📦 GlotLID Git-ed872d"></a>
78
+ <a href="https://github.com/cisnlp/GlotScript"><img alt="GlotScript GitHub" src="https://img.shields.io/badge/📦 GlotScript Git-78866b"></a>
79
+ <a href="https://github.com/cisnlp/GlotWeb/blob/main/LICENSE"><img alt="GitHub license" src="https://img.shields.io/github/license/cisnlp/GlotWeb"></a>
80
+ <a href="https://arxiv.org/abs/xxxx.xxxxx"><img alt="arXiv" src="https://img.shields.io/badge/arXiv-xxxx.xxxxx-b31b1b.svg"></a>
81
+ </p>"""
82
+ c = st.container()
83
+ c.write(html, unsafe_allow_html=True)