shubham680 commited on
Commit
e44663b
·
verified ·
1 Parent(s): 2817116

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -57,7 +57,8 @@ shear=st.checkbox("Shearing")
57
  crop=st.checkbox("Crop")
58
 
59
 
60
- btn=st.button("Submit")
 
61
 
62
  def translation(img):
63
  tx=30 #np.random.randint(2,60)
@@ -113,19 +114,19 @@ if uploaded_file is not None:
113
  # # Convert BGR to RGB as streamlit expects RGB colorspace
114
  # img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
115
  transformation = []
116
- if trans:
117
  translation(img)
118
  transformation.append("Translation")
119
- if rot:
120
  rotation(img)
121
  transformation.append("Rotation")
122
- if scal:
123
  scaling(img)
124
  transformation.append("Scaling")
125
- if shear:
126
  shearing(img)
127
  transformation.append("Shearing")
128
- if crop:
129
  cropping(img)
130
  transformation.append("Crop")
131
 
 
57
  crop=st.checkbox("Crop")
58
 
59
 
60
+ btn=st.button("Preview Image")
61
+
62
 
63
  def translation(img):
64
  tx=30 #np.random.randint(2,60)
 
114
  # # Convert BGR to RGB as streamlit expects RGB colorspace
115
  # img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
116
  transformation = []
117
+ if trans and btn:
118
  translation(img)
119
  transformation.append("Translation")
120
+ if rot and btn:
121
  rotation(img)
122
  transformation.append("Rotation")
123
+ if scal and btn:
124
  scaling(img)
125
  transformation.append("Scaling")
126
+ if shear and btn:
127
  shearing(img)
128
  transformation.append("Shearing")
129
+ if crop and btn:
130
  cropping(img)
131
  transformation.append("Crop")
132