kargaranamir
commited on
Commit
·
ed8af94
1
Parent(s):
8bb03d6
change layout in sitepage.
Browse files
app.py
CHANGED
@@ -38,8 +38,6 @@ def render_site_table(isocode):
|
|
38 |
back_text = '<a href="/?home=True" target="_self">[Back]</a>'
|
39 |
st.markdown(back_text, unsafe_allow_html=True)
|
40 |
|
41 |
-
st.write({'Language Name': data[isocode]['Language Name'], 'ISO Code': isocode})
|
42 |
-
|
43 |
# site
|
44 |
urls = data[isocode].get('Sites', [])
|
45 |
df_urls = pd.DataFrame(urls)
|
@@ -48,9 +46,11 @@ def render_site_table(isocode):
|
|
48 |
df_urls = df_urls.reset_index(drop=True)
|
49 |
df_urls['Number of Links'] = df_urls.apply(lambda row: '<a href="/?isocode={}&siteurl={}" target="_self">{}</a>'.format(isocode, row['Site URL'], row['Number of Links']), axis=1)
|
50 |
df_urls['Site URL'] = df_urls['Site URL'].apply(lambda url: f'<a href="{url}">{url}</a>')
|
|
|
|
|
51 |
|
52 |
# Display the table
|
53 |
-
df_urls = df_urls[['Site Name', 'Site URL', 'Category', 'Number of Links', 'Possible Parallel Languages']]
|
54 |
st.write(df_to_html(df_urls), unsafe_allow_html=True)
|
55 |
|
56 |
|
|
|
38 |
back_text = '<a href="/?home=True" target="_self">[Back]</a>'
|
39 |
st.markdown(back_text, unsafe_allow_html=True)
|
40 |
|
|
|
|
|
41 |
# site
|
42 |
urls = data[isocode].get('Sites', [])
|
43 |
df_urls = pd.DataFrame(urls)
|
|
|
46 |
df_urls = df_urls.reset_index(drop=True)
|
47 |
df_urls['Number of Links'] = df_urls.apply(lambda row: '<a href="/?isocode={}&siteurl={}" target="_self">{}</a>'.format(isocode, row['Site URL'], row['Number of Links']), axis=1)
|
48 |
df_urls['Site URL'] = df_urls['Site URL'].apply(lambda url: f'<a href="{url}">{url}</a>')
|
49 |
+
df_urls['Language Name'] = data[isocode]['Language Name']
|
50 |
+
df_urls['ISO Code'] = isocode
|
51 |
|
52 |
# Display the table
|
53 |
+
df_urls = df_urls[['ISO Code', 'Language Name', 'Site Name', 'Site URL', 'Category', 'Number of Links', 'Possible Parallel Languages', 'Confidence']]
|
54 |
st.write(df_to_html(df_urls), unsafe_allow_html=True)
|
55 |
|
56 |
|