Plsek commited on
Commit
dd3e183
·
1 Parent(s): c1f2126

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -11,8 +11,7 @@ st.set_option('deprecation.showPyplotGlobalUse', False)
11
 
12
  st.title("Cavity Detection Tool")
13
 
14
- st.text("Cavity Detection Tool (CADET) is a machine learning pipeline trained to detect X-ray cavities from noisy Chandra images of early-type galaxies.\
15
- To use this tool upload your image, select the scale of interest and make a prediction! If you use output of this tool in your research please cite [Plšek et al. 2023](https://arxiv.org/abs/2304.05457)")
16
 
17
  model = load_model("CADET.hdf5")
18
 
@@ -31,7 +30,8 @@ def plot_image(image_array, scale):
31
 
32
  plt.axis('off')
33
  fig.set_size_inches((4,4))
34
- st.pyplot()
 
35
 
36
  # Define function to plot the prediction
37
  def plot_prediction(image_array, pred):
@@ -43,7 +43,8 @@ def plot_prediction(image_array, pred):
43
  # plt.subplot(1, 2, 2)
44
  plt.imshow(pred, origin="lower")
45
  plt.axis('off')
46
- col2.pyplot()
 
47
 
48
  def cut(data0, wcs0, scale=1):
49
  shape = data0.shape[0]
 
11
 
12
  st.title("Cavity Detection Tool")
13
 
14
+ st.text("Cavity Detection Tool (CADET) is a machine learning pipeline trained to detect\n X-ray cavities from noisy Chandra images of early-type galaxies.To use this tool upload\n your image, select the scale of interest and make a prediction! If you use output of this\n tool in your research please cite [Plšek et al. 2023](https://arxiv.org/abs/2304.05457)")
 
15
 
16
  model = load_model("CADET.hdf5")
17
 
 
30
 
31
  plt.axis('off')
32
  fig.set_size_inches((4,4))
33
+ with col1:
34
+ st.pyplot()
35
 
36
  # Define function to plot the prediction
37
  def plot_prediction(image_array, pred):
 
43
  # plt.subplot(1, 2, 2)
44
  plt.imshow(pred, origin="lower")
45
  plt.axis('off')
46
+ with col2:
47
+ st.pyplot()
48
 
49
  def cut(data0, wcs0, scale=1):
50
  shape = data0.shape[0]