EngAbod commited on
Commit
6180481
·
1 Parent(s): d6354fb

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
- if average_brightness < 100:
180
  st.text("إضاءة غير جيدة")
181
  st.text("انتقل الى مكان جيد الإضاءة")
182
  else:
@@ -222,11 +222,11 @@ if picture:
222
  prediction2 = model2.predict(X_test_array_reshaped)
223
  if prediction >= 0.90 and prediction2 >= 0.0000000000001:
224
  st.text("صورة حقيقية")
225
- st.text(str(prediction[0]))
226
  # st.text(str(prediction2[0]))
227
  else:
228
  st.text("صورة مزيفة")
229
- st.text(str(prediction[0]))
230
  # st.text(str(prediction2[0]))
231
  else:
232
  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
+ if average_brightness < 115:
180
  st.text("إضاءة غير جيدة")
181
  st.text("انتقل الى مكان جيد الإضاءة")
182
  else:
 
222
  prediction2 = model2.predict(X_test_array_reshaped)
223
  if prediction >= 0.90 and prediction2 >= 0.0000000000001:
224
  st.text("صورة حقيقية")
225
+ # st.text(str(prediction[0]))
226
  # st.text(str(prediction2[0]))
227
  else:
228
  st.text("صورة مزيفة")
229
+ # st.text(str(prediction[0]))
230
  # st.text(str(prediction2[0]))
231
  else:
232
  st.text("لا يوجد وجه")