gchhablani commited on
Commit
c220e56
1 Parent(s): 547e7ab

Update app

Browse files
Files changed (1) hide show
  1. app.py +2 -12
app.py CHANGED
@@ -88,7 +88,7 @@ if state.model is None:
88
  with st.spinner("Loading model..."):
89
  state.model = load_model(checkpoints[0])
90
 
91
- first_index = 20
92
  # Init Session State
93
  if state.image_file is None:
94
  state.image_file = dummy_data.loc[first_index, "image_file"]
@@ -98,17 +98,6 @@ if state.image_file is None:
98
  image = plt.imread(image_path)
99
  state.image = image
100
 
101
- # col1, col2 = st.beta_columns([6, 4])
102
-
103
- # col2.write("OR")
104
-
105
- # uploaded_file = col2.file_uploader("Upload your image", type=["png", "jpg", "jpeg"])
106
- # if uploaded_file is not None:
107
- # state.image_file = os.path.join("images", uploaded_file.name)
108
- # state.image = np.array(Image.open(uploaded_file))
109
-
110
- transformed_image = get_transformed_image(state.image)
111
-
112
  new_col1, new_col2 = st.beta_columns([5,5])
113
 
114
  if new_col2.button("Get a random example", help="Get a random example from one of the seeded examples."):
@@ -120,6 +109,7 @@ if new_col2.button("Get a random example", help="Get a random example from one o
120
  image = plt.imread(image_path)
121
  state.image = image
122
 
 
123
  # Display Image
124
  new_col1.image(state.image, use_column_width="always")
125
 
 
88
  with st.spinner("Loading model..."):
89
  state.model = load_model(checkpoints[0])
90
 
91
+ first_index = 25
92
  # Init Session State
93
  if state.image_file is None:
94
  state.image_file = dummy_data.loc[first_index, "image_file"]
 
98
  image = plt.imread(image_path)
99
  state.image = image
100
 
 
 
 
 
 
 
 
 
 
 
 
101
  new_col1, new_col2 = st.beta_columns([5,5])
102
 
103
  if new_col2.button("Get a random example", help="Get a random example from one of the seeded examples."):
 
109
  image = plt.imread(image_path)
110
  state.image = image
111
 
112
+ transformed_image = get_transformed_image(state.image)
113
  # Display Image
114
  new_col1.image(state.image, use_column_width="always")
115