File size: 847 Bytes
c269778 cc80d6b 96f6cd5 6f29af0 8a98183 b7c76a9 35911ab bf69f57 96f6cd5 cc80d6b 3f06556 fbb1e19 09b7e12 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
import streamlit as st
# import webbrowser
from streamlit.components.v1 import html
st.title('LLMs Chat Interfaces')
mistral_url = 'https://aipatseer-chatllm.hf.space'
llama2_url = 'https://huggingface-projects-llama-2-7b-chat.hf.space'
st.image('mistral_logo.webp',width=100)
st.image('llama2_logo.png',width=100)
def open_page(url):
open_script= """
<script type="text/javascript">
window.open('%s', '_blank').focus();
</script>
""" % (url)
html(open_script)
st.write('Select Chat Interface and click on button! To use another Interface then untick selected option and click on button again.')
if st.checkbox("Mistral Chat"):
st.button('Mistral Chat', on_click=open_page, args=(mistral_url,))
elif st.checkbox("Llama-2 Chat"):
st.button('Llama2 Chat', on_click=open_page, args=(llama2_url,)) |