eagle0504 commited on
Commit
23ac442
·
verified ·
1 Parent(s): e03393e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -23
app.py CHANGED
@@ -64,32 +64,30 @@ if not st.session_state.form_submitted:
64
  form_dialog()
65
  else:
66
  st.success("Form submitted successfully!")
67
- # st.json(st.session_state.data) # to be omitted
68
-
69
  with open('data.json', 'r') as f:
70
  data = json.load(f)
71
 
72
  # Display
73
  st.json(data)
74
 
75
- # Columns
76
- col1, col2, col3 = st.columns(3)
77
-
78
- with col1:
79
- with st.expander("See explanation"):
80
- st.write("This is the 1st shelter. API Call will generate this outcome.")
81
- st.header("A cat")
82
- st.image("https://static.streamlit.io/examples/cat.jpg")
83
-
84
- with col2:
85
- with st.expander("See explanation"):
86
- st.write('''
87
- This is the 2nd shelter. API Call will generate this outcome....
88
- ''')
89
- st.header("A dog")
90
- st.image("https://static.streamlit.io/examples/dog.jpg")
91
-
92
- with col3:
93
- with st.expander("See explanation"):
94
- st.header("An owl")
95
- st.image("https://static.streamlit.io/examples/owl.jpg")
 
64
  form_dialog()
65
  else:
66
  st.success("Form submitted successfully!")
67
+
 
68
  with open('data.json', 'r') as f:
69
  data = json.load(f)
70
 
71
  # Display
72
  st.json(data)
73
 
74
+ # Radio button for content display
75
+ shelter_option = st.radio(
76
+ "Select the shelter information to view:",
77
+ ["Shelter 1", "Shelter 2", "Shelter 3"],
78
+ index=0,
79
+ help="Select a shelter to see detailed information and images."
80
+ )
81
+
82
+ if shelter_option == "Shelter 1":
83
+ st.write("This is the 1st shelter. API Call will generate this outcome.")
84
+ st.header("A cat")
85
+ st.image("https://static.streamlit.io/examples/cat.jpg")
86
+ elif shelter_option == "Shelter 2":
87
+ st.write("This is the 2nd shelter. API Call will generate this outcome....")
88
+ st.header("A dog")
89
+ st.image("https://static.streamlit.io/examples/dog.jpg")
90
+ elif shelter_option == "Shelter 3":
91
+ st.write("This is the 3rd shelter. API Call will generate this outcome....")
92
+ st.header("An owl")
93
+ st.image("https://static.streamlit.io/examples/owl.jpg")