import streamlit as st import gradio as gr import IPython import streamlit as st import streamlit.components.v1 as components # query params exist try: options = ['cat', 'dog', 'mouse', 'bat', 'duck'] query_params = st.experimental_get_query_params() query_option = query_params['option'][0] #throws an exception when visiting http://host:port option_selected = st.sidebar.selectbox('Pick option', options, index=options.index(query_option)) if option_selected: st.experimental_set_query_params(option=option_selected) # run when query params don't exist. e.g on first launch except: # catch exception and set query param to predefined value options = ['cat', 'dog', 'mouse', 'bat', 'duck'] st.experimental_set_query_params(option=options[1]) # defaults to dog query_params = st.experimental_get_query_params() query_option = query_params['option'][0] option_selected = st.sidebar.selectbox('Pick option', options, index=options.index(query_option)) if option_selected: st.experimental_set_query_params(option=option_selected) src='https://oreilly-qc.github.io?p=2-1' src='https://javafxpert.github.io/grok-bloch/' src='https://davidbkemp.github.io/quantum-gate-playground/' src='https://algassert.com/quirk#circuit={%22cols%22:[[%22H%22],[%22Bloch%22],[%22Measure%22]]}' st.components.v1.iframe(src, width=None, height=None, scrolling=False) from IPython.display import IFrame title = "AI Quantum - QGAN" description = "Using Superposition Advantage from Quantum for QGAN AI." article = "

" #IFrame(src='https://oreilly-qc.github.io?p=2-1', width=900, height=900) IFrame(src='https://oreilly-qc.github.io?p=2-1', width=900, height=900) #article = "