EngAbod commited on
Commit
fc85470
·
1 Parent(s): e043864

Update app.py

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