Skip to content

Commit

Permalink
oori favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
choccccy committed Jul 19, 2023
1 parent a7c565a commit d323996
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions demo/chat_pdf_streamlit_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,15 @@

PDF_USER_QUERY_PROMPT = 'Ask a question about your PDF:'

@st.cache_data
def load_favicon():
# oori_logo[32px].png as a data URL
return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAyHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjabVBBDsQgCLz7in2CMqjwHLttk/3BPn9RbNM2O4kjMGREwvb97OHVQYkD5ypFS4kGVlZqFkh0tMEp8uABmpLlt3o4BbIS7IanUmb/UU+ngV/NonwxkvcUlrugPP3lYTQfQp+oT7FOI51GIBfSNGj+rVhU6vULyxbvED+h0/4m7bW8uPbMudr21mzvgGhDQjQG2AdAPwhoFlTjBLXGNGJAjDOOndhC/u3pQPgBeFtaVQmTEesAAAGDaUNDUElDQyBwcm9maWxlAAB4nH2RPUjDQBzFX1OlRSoOLSjikKF2souKONYqFKFCqBVadTC5fkKThiTFxVFwLTj4sVh1cHHW1cFVEAQ/QFxdnBRdpMT/JYUWMR4c9+PdvcfdO0Bo1Zhq9iUAVbOMTCop5vKrYuAVAYQxjBiCMjP1OUlKw3N83cPH17s4z/I+9+cYLBRNBvhE4gTTDYt4g3hm09I57xNHWEUuEJ8TTxh0QeJHrisuv3EuOyzwzIiRzcwTR4jFcg8rPcwqhko8TRwtqBrlCzmXC5y3OKu1Buvck78wVNRWlrlOcwwpLGIJEkQoaKCKGizEadVIMZGh/aSHf9TxS+RSyFUFI8cC6lAhO37wP/jdrVmamnSTQkmg/8W2P8aBwC7Qbtr297Ftt08A/zNwpXX99RYw+0l6s6tFj4ChbeDiuqspe8DlDjDypMuG7Eh+mkKpBLyf0TflgfAtMLDm9tbZ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CiAgIEdJTVA6QVBJPSIyLjAiCiAgIEdJTVA6UGxhdGZvcm09Ik1hYyBPUyIKICAgR0lNUDpUaW1lU3RhbXA9IjE2ODk4MDk5Mzk0MDEyNzAiCiAgIEdJTVA6VmVyc2lvbj0iMi4xMC4zNCIKICAgZGM6Rm9ybWF0PSJpbWFnZS9wbmciCiAgIHRpZmY6T3JpZW50YXRpb249IjEiCiAgIHhtcDpDcmVhdG9yVG9vbD0iR0lNUCAyLjEwIgogICB4bXA6TWV0YWRhdGFEYXRlPSIyMDIzOjA3OjE5VDE3OjM4OjUwLTA2OjAwIgogICB4bXA6TW9kaWZ5RGF0ZT0iMjAyMzowNzoxOVQxNzozODo1MC0wNjowMCI+CiAgIDx4bXBNTTpIaXN0b3J5PgogICAgPHJkZjpTZXE+CiAgICAgPHJkZjpsaQogICAgICBzdEV2dDphY3Rpb249InNhdmVkIgogICAgICBzdEV2dDpjaGFuZ2VkPSIvIgogICAgICBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjBhMGMxOWQ5LWQ4ZDUtNDE4MC1iNGNiLTA0MjkyMTM3Y2UzMSIKICAgICAgc3RFdnQ6c29mdHdhcmVBZ2VudD0iR2ltcCAyLjEwIChNYWMgT1MpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA3LTE5VDE3OjM4OjU5LTA2OjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgIC'

# Streamlit caching to save on repeat loads
@st.cache_data
def load_throbber():
# throbber.gif as a data URL
# oori_throbber.gif as a data URL
# TODO: use a less archaic format than GIF; perhaps some sort of animatable vector image
return 'data:image/gif;base64,R0lGODlhgACAAKEDAGwZDPPVSf///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFFAADACwAAAAAgACAAAACm5yPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gvH8kzX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LLM_TEMP):
'''
Oori — Ask your PDF 📄💬
'''
favicon = load_favicon()
st.set_page_config( # Set up Streamlit page
page_title='Ask your PDF',
page_icon='📄💬',
page_icon=favicon,
layout='wide',
initial_sidebar_state='expanded',
)
Expand Down

0 comments on commit d323996

Please sign in to comment.