shubham680 commited on
Commit
fa2c20b
·
verified ·
1 Parent(s): 74ee273

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -59,9 +59,12 @@ scal = st.checkbox("Scaling")
59
  shear=st.checkbox("Shearing")
60
  crop=st.checkbox("Crop")
61
 
 
62
  transformation=[]
63
  btn=st.button("Preview Image")
64
 
 
 
65
  def clear_folder(folder_name="output_images"):
66
  if os.path.exists(folder_name):
67
  for file in os.listdir(folder_name):
@@ -81,11 +84,11 @@ def save_image_and_show(image, folder_name="output_images"):
81
  # Save the image
82
  cv2.imwrite(image_path, image)
83
 
84
-
85
- # Showing the success message
86
- st.success(f"Image saved to {image_path} (local path)")
87
- # Show the image to the user (not the path)
88
- st.image(image, caption="Saved Image", channels="BGR")
89
 
90
 
91
 
 
59
  shear=st.checkbox("Shearing")
60
  crop=st.checkbox("Crop")
61
 
62
+
63
  transformation=[]
64
  btn=st.button("Preview Image")
65
 
66
+ #sub=st.button("Preview Image")
67
+
68
  def clear_folder(folder_name="output_images"):
69
  if os.path.exists(folder_name):
70
  for file in os.listdir(folder_name):
 
84
  # Save the image
85
  cv2.imwrite(image_path, image)
86
 
87
+ if btn:
88
+ # Showing the success message
89
+ st.success(f"Image saved to {image_path} (local path)")
90
+ # Show the image to the user (not the path)
91
+ st.image(image, caption="Saved Image", channels="BGR")
92
 
93
 
94