Update app.py
Browse files
app.py
CHANGED
@@ -456,9 +456,12 @@ elif video_url:
|
|
456 |
st.video(video_url) # Show direct MP4 video
|
457 |
video_path = download_video(video_url) # Download direct MP4 video
|
458 |
|
459 |
-
#
|
460 |
-
|
461 |
-
|
|
|
|
|
|
|
462 |
st.write("🔍 Processing... Please wait.")
|
463 |
result = detect_deepfake_video(video_path)
|
464 |
|
@@ -468,7 +471,7 @@ if video_path and os.path.exists(video_path):
|
|
468 |
st.success(f"✅ This video appears to be REAL. (Confidence: {1 - result['score']:.2f})")
|
469 |
else:
|
470 |
st.warning("⚠️ Unable to analyze the video. Please try a different file.")
|
471 |
-
else:
|
472 |
-
|
473 |
|
474 |
st.markdown("🔹 **Developed for Fake News & Deepfake Detection Hackathon**")
|
|
|
456 |
st.video(video_url) # Show direct MP4 video
|
457 |
video_path = download_video(video_url) # Download direct MP4 video
|
458 |
|
459 |
+
# ✅ "Analyze Video" بٹن ہمیشہ شو ہوگا
|
460 |
+
analyze_button = st.button("Analyze Video")
|
461 |
+
|
462 |
+
# 🚀 اگر ویڈیو موجود ہے تو تجزیہ کریں
|
463 |
+
if analyze_button:
|
464 |
+
if video_path and os.path.exists(video_path):
|
465 |
st.write("🔍 Processing... Please wait.")
|
466 |
result = detect_deepfake_video(video_path)
|
467 |
|
|
|
471 |
st.success(f"✅ This video appears to be REAL. (Confidence: {1 - result['score']:.2f})")
|
472 |
else:
|
473 |
st.warning("⚠️ Unable to analyze the video. Please try a different file.")
|
474 |
+
else:
|
475 |
+
st.warning("⚠️ Invalid video. Please check the file or URL.")
|
476 |
|
477 |
st.markdown("🔹 **Developed for Fake News & Deepfake Detection Hackathon**")
|