EngAbod commited on
Commit
8ae9f7f
·
1 Parent(s): 7d47ff1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -176,7 +176,7 @@ if picture:
176
  gray = cv2.cvtColor(frm, cv2.COLOR_BGR2GRAY)
177
  average_brightness = cv2.mean(gray)[0]
178
  # st.text(str(average_brightness))
179
- if average_brightness < 100:
180
  st.text("إضاءة غير جيدة")
181
  st.text("انتقل الى مكان جيد الإضاءة")
182
  else:
@@ -220,7 +220,7 @@ if picture:
220
  X_test_array_reshaped = np.expand_dims(X_array, axis=-1)
221
  prediction = model.predict(X_test_array_reshaped)
222
  prediction2 = model2.predict(X_test_array_reshaped)
223
- if prediction >= 0.90 and prediction2 >= 0.00000000000001:
224
  st.text("صورة حقيقية")
225
  # st.text(str(prediction[0]))
226
  # st.text(str(prediction2[0]))
 
176
  gray = cv2.cvtColor(frm, cv2.COLOR_BGR2GRAY)
177
  average_brightness = cv2.mean(gray)[0]
178
  # st.text(str(average_brightness))
179
+ if average_brightness < 80:
180
  st.text("إضاءة غير جيدة")
181
  st.text("انتقل الى مكان جيد الإضاءة")
182
  else:
 
220
  X_test_array_reshaped = np.expand_dims(X_array, axis=-1)
221
  prediction = model.predict(X_test_array_reshaped)
222
  prediction2 = model2.predict(X_test_array_reshaped)
223
+ if prediction >= 0.80 and prediction2 >= 0.00000000000001:
224
  st.text("صورة حقيقية")
225
  # st.text(str(prediction[0]))
226
  # st.text(str(prediction2[0]))