IliaLarchenko commited on
Commit
242631d
1 Parent(s): d0745fb

better visual elements

Browse files
Files changed (2) hide show
  1. src/app.py +5 -3
  2. src/visuals.py +6 -6
src/app.py CHANGED
@@ -35,16 +35,18 @@ transform = getattr(A, transform_name)(**param_values)
35
  augmented_image = transform(image=image)["image"]
36
 
37
  # show the params passed
38
- st.text("Params passed: " + get_params_string(param_values))
39
- st.text("Press R to update")
 
40
 
41
  # show the images
42
  st.image(
43
  [image, augmented_image],
44
  caption=["Original image", "Transformed image"],
45
- width=320,
46
  )
47
 
48
  # print additional info
 
49
  show_docstring(transform)
50
  show_credentials()
 
35
  augmented_image = transform(image=image)["image"]
36
 
37
  # show the params passed
38
+ # st.text("Params passed: ")
39
+ # st.code(get_params_string(param_values))
40
+ # st.text("Press R to update")
41
 
42
  # show the images
43
  st.image(
44
  [image, augmented_image],
45
  caption=["Original image", "Transformed image"],
46
+ width=335,
47
  )
48
 
49
  # print additional info
50
+ st.code(str(transform))
51
  show_docstring(transform)
52
  show_credentials()
src/visuals.py CHANGED
@@ -27,14 +27,14 @@ def show_transform_control(transform_params: dict):
27
 
28
 
29
  def show_credentials():
30
- st.text("")
31
- st.text("")
32
  st.subheader("Credentials:")
33
- st.text("Source: github.com/IliaLarchenko/albumentations-demo")
34
- st.text("Albumentations library: github.com/albumentations-team/albumentations")
35
- st.text("Image Source: pexels.com/royalty-free-images/")
36
 
37
 
38
  def show_docstring(obj_with_ds):
 
39
  st.subheader("Docstring:")
40
- st.text(str(obj_with_ds.__doc__))
 
27
 
28
 
29
  def show_credentials():
30
+ st.markdown("* * *")
 
31
  st.subheader("Credentials:")
32
+ st.markdown("Source: [github.com/IliaLarchenko/albumentations-demo](https://github.com/IliaLarchenko/albumentations-demo)")
33
+ st.markdown("Albumentations library: [github.com/albumentations-team/albumentations](https://github.com/albumentations-team/albumentations)")
34
+ st.markdown("Image Source: [pexels.com/royalty-free-images](https://pexels.com/royalty-free-images/)")
35
 
36
 
37
  def show_docstring(obj_with_ds):
38
+ st.markdown("* * *")
39
  st.subheader("Docstring:")
40
+ st.text(obj_with_ds.__doc__)