awacke1 commited on
Commit
fb79c2b
·
1 Parent(s): 9f423cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -5,6 +5,16 @@ import streamlit as st
5
  import streamlit.components.v1 as components
6
  from IPython.display import IFrame
7
 
 
 
 
 
 
 
 
 
 
 
8
  # query params exist
9
  try:
10
  options = ['Book', 'Grok', 'Playground', 'Circuit']
@@ -26,16 +36,6 @@ except: # catch exception and set query param to predefined value
26
  st.experimental_set_query_params(option=option_selected)
27
  SetIframeURL(option_selected)
28
 
29
- def SetIframeURL(option_selected):
30
- if (option_selected=='Book'):
31
- src='https://oreilly-qc.github.io?p=2-1'
32
- if (option_selected=='Grok'):
33
- src='https://javafxpert.github.io/grok-bloch/'
34
- if (option_selected=='Playground'):
35
- src='https://davidbkemp.github.io/quantum-gate-playground/'
36
- if (option_selected=='Circuit'):
37
- src='https://algassert.com/quirk#circuit={%22cols%22:[[%22H%22],[%22Bloch%22],[%22Measure%22]]}'
38
-
39
  # Render iframe contents
40
  st.components.v1.iframe(src, width=1200, height=800, scrolling=False)
41
 
 
5
  import streamlit.components.v1 as components
6
  from IPython.display import IFrame
7
 
8
+ def SetIframeURL(option_selected):
9
+ if (option_selected=='Book'):
10
+ src='https://oreilly-qc.github.io?p=2-1'
11
+ if (option_selected=='Grok'):
12
+ src='https://javafxpert.github.io/grok-bloch/'
13
+ if (option_selected=='Playground'):
14
+ src='https://davidbkemp.github.io/quantum-gate-playground/'
15
+ if (option_selected=='Circuit'):
16
+ src='https://algassert.com/quirk#circuit={%22cols%22:[[%22H%22],[%22Bloch%22],[%22Measure%22]]}'
17
+
18
  # query params exist
19
  try:
20
  options = ['Book', 'Grok', 'Playground', 'Circuit']
 
36
  st.experimental_set_query_params(option=option_selected)
37
  SetIframeURL(option_selected)
38
 
 
 
 
 
 
 
 
 
 
 
39
  # Render iframe contents
40
  st.components.v1.iframe(src, width=1200, height=800, scrolling=False)
41