jableable commited on
Commit
62d023c
·
verified ·
1 Parent(s): 4ce749d

Update new_app.py

Browse files
Files changed (1) hide show
  1. new_app.py +13 -12
new_app.py CHANGED
@@ -28,25 +28,26 @@ st.markdown("""
28
  <style>
29
  .block-container {
30
  padding-top: 2.2rem;
31
- padding-bottom: 0rem; padding-left: 5rem; padding-right: 5rem;
 
 
32
  }
33
  hr {
34
- margin-top: 0.1cm;
35
  margin-bottom: 0.25cm;
36
  }
37
- .stImage img {
38
- display: block;
39
- margin-left: auto;
40
- margin-right: auto;
41
- }
42
- /* center the st.image container itself */
43
  [data-testid="stImage"] {
44
- display: flex;
45
- justify-content: center;
 
 
 
 
46
  }
47
  </style>
48
  """, unsafe_allow_html=True)
49
 
 
50
  #title
51
  col1, col2 = st.columns(2)
52
  with col1:
@@ -98,10 +99,10 @@ with col3:
98
  with st.form("coords_form"):
99
  c1, c2 = st.columns(2)
100
  with c1:
101
- st.number_input('Latitude', key="lat", value=float(state.lat), min_value=-90.0, max_value=90.0, step=0.01, format="%.4f")
102
  st.write('The current lat/long are:')
103
  with c2:
104
- st.number_input('Longitude', key="lng", value=float(state.lng), min_value=-180.0, max_value=180.0, step=0.01, format="%.4f")
105
  st.write(f"{st.session_state.lat:.2f}, {st.session_state.lng:.2f}")
106
  submitted = st.form_submit_button("Get Image and Prediction")
107
 
 
28
  <style>
29
  .block-container {
30
  padding-top: 2.2rem;
31
+ padding-bottom: 0rem;
32
+ padding-left: 5rem;
33
+ padding-right: 5rem;
34
  }
35
  hr {
36
+ margin-top: 0.0cm;
37
  margin-bottom: 0.25cm;
38
  }
 
 
 
 
 
 
39
  [data-testid="stImage"] {
40
+ display: flex !important;
41
+ justify-content: center !important;
42
+ }
43
+ [data-testid="stImage"] img {
44
+ margin: auto;
45
+ display: block;
46
  }
47
  </style>
48
  """, unsafe_allow_html=True)
49
 
50
+
51
  #title
52
  col1, col2 = st.columns(2)
53
  with col1:
 
99
  with st.form("coords_form"):
100
  c1, c2 = st.columns(2)
101
  with c1:
102
+ st.number_input('Latitude', key="lat", value=float(state.lat), min_value=-90.0, max_value=90.0, step=0.01, format="%.2f")
103
  st.write('The current lat/long are:')
104
  with c2:
105
+ st.number_input('Longitude', key="lng", value=float(state.lng), min_value=-180.0, max_value=180.0, step=0.01, format="%.2f")
106
  st.write(f"{st.session_state.lat:.2f}, {st.session_state.lng:.2f}")
107
  submitted = st.form_submit_button("Get Image and Prediction")
108