|
import streamlit as st |
|
import pandas as pd |
|
|
|
def display_ethics(): |
|
|
|
display_ethics_statement() |
|
|
|
display_license_statement() |
|
|
|
def display_license_statement(): |
|
st.write('') |
|
st.write('##### How papers were included in the index based on license.') |
|
st.caption(f'The paper id and title has been included in the index for a full attribution to the authors') |
|
ccby = ['<a target="_blank" href="https://creativecommons.org/licenses/by/4.0/">CC BY</a>', |
|
'<a target="_blank" href="https://github.com/arylwen/mlk8s/tree/main/apps/papers-kg">full content KG questions pipeline</a>'] |
|
ccbysa = ['<a target="_blank" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA</a>', |
|
'<a target="_blank" href="https://github.com/arylwen/mlk8s/tree/main/apps/papers-kg">full content KG questions pipeline</a>'] |
|
ccbyncsa = ['<a target="_blank" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC NC-BY-NC-SA</a>', |
|
'<a target="_blank" href="https://github.com/arylwen/mlk8s/tree/main/apps/papers-kg">full content KG questions pipeline</a>'] |
|
ccbyncnd = ['<a target="_blank" href="https://creativecommons.org/licenses/by-nc-nd/4.0/">CC NC-BY-NC-ND</a>', |
|
'<a target="_blank" href="https://github.com/arylwen/mlk8s/tree/main/apps/papers-kg">arxiv metadata abstract KG questions pipeline</a>'] |
|
license_statement = [ccby, ccbysa, ccbyncsa, ccbyncnd] |
|
df = pd.DataFrame(license_statement) |
|
df.columns = ['license', 'how papers are used'] |
|
st.markdown(""" <style> |
|
table[class*="dataframe"] { |
|
font-size: 14px; |
|
} |
|
</style> """, unsafe_allow_html=True) |
|
st.write(df.to_html(escape=False), unsafe_allow_html=True) |
|
|
|
def display_ethics_statement(): |
|
st.write('##### Bias, risks, limitations and terms of use for the models.') |
|
ethics_statement = [] |
|
falcon = ['hf/tiiuae/falcon-7b-instruct', '<a target="_blank" href="https://huggingface.co/tiiuae/falcon-7b">Bias, Risks, and Limitations</a>'] |
|
cohere = ['cohere/command', '<a target="_blank" href="https://cohere.com/terms-of-use">Terms of use</a>'] |
|
camel = ['baseten/Camel-5b', '<a target="_blank" href="https://huggingface.co/Writer/camel-5b-hf">Bias, Risks, and Limitations</a>'] |
|
davinci = ['openai/text-davinci-003', '<a target="_blank" href="https://openai.com/policies/terms-of-use">Terms of Use</a>'] |
|
|
|
ethics_statement.extend([falcon, cohere, camel, davinci]) |
|
df = pd.DataFrame(ethics_statement) |
|
df.columns = ['model', 'model link'] |
|
st.markdown(""" <style> |
|
table[class*="dataframe"] { |
|
font-size: 14px; |
|
} |
|
</style> """, unsafe_allow_html=True) |
|
st.write(df.to_html(escape=False), unsafe_allow_html=True) |