|
import streamlit as st |
|
|
|
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,)) |