PixelNavigation commited on
Commit
c168c44
Β·
1 Parent(s): adb23aa

Restructured the output

Browse files
frontend/src/Components/UploadBox.js CHANGED
@@ -271,34 +271,6 @@ Please explain in simple terms what factors likely contributed to this classific
271
  <div className={styles.success}>
272
  <h3>🎯 Detection Result</h3>
273
  <div className={styles.resultGrid}>
274
- <div className={styles.mainResult}>
275
- <p><strong>Status:</strong>
276
- <span className={result.is_deepfake ? styles.fake : styles.real}>
277
- {result.is_deepfake ? '🚨 DEEPFAKE DETECTED' : 'βœ… APPEARS AUTHENTIC'}
278
- </span>
279
- </p>
280
- <p><strong>Confidence:</strong> {(result.confidence * 100).toFixed(1)}%</p>
281
- <p><strong>Fake Probability:</strong> {(result.fake_probability * 100).toFixed(1)}%</p>
282
- <p><strong>File Type:</strong> {result.file_type}</p>
283
- </div>
284
-
285
-
286
-
287
- {/* Frame Analysis for Videos */}
288
- {result.file_type === 'video' && result.fake_frames && result.fake_frames.length > 0 && (
289
- <div className={styles.frameAnalysis}>
290
- <h4>🎬 Suspicious Frames Detected</h4>
291
- <p>The following frames were flagged as potentially manipulated:</p>
292
- <div className={styles.frameList}>
293
- {result.fake_frames.map((frame, index) => (
294
- <div key={index} className={styles.frameItem}>
295
- Frame {frame}
296
- </div>
297
- ))}
298
- </div>
299
- </div>
300
- )}
301
-
302
  {/* Grad-CAM Visualization with AI Explanation */}
303
  {gradcamImage && (
304
  <div className={styles.gradcam}>
@@ -315,7 +287,18 @@ Please explain in simple terms what factors likely contributed to this classific
315
  </p>
316
  </div>
317
  <div style={{ flex: 1 }}>
318
- <h4 style={{ margin: '0 0 8px 0', color: '#5eead4', fontSize: '1.05rem', fontWeight: 600 }}>πŸ€– AI Explanation</h4>
 
 
 
 
 
 
 
 
 
 
 
319
  {loadingExplanation ? (
320
  <div className={styles.loadingExplain}>
321
  <div className={styles.loadingSpinner}></div>
@@ -334,6 +317,26 @@ Please explain in simple terms what factors likely contributed to this classific
334
  </div>
335
  </div>
336
  )}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
337
  </div>
338
  </div>
339
  )}
 
271
  <div className={styles.success}>
272
  <h3>🎯 Detection Result</h3>
273
  <div className={styles.resultGrid}>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  {/* Grad-CAM Visualization with AI Explanation */}
275
  {gradcamImage && (
276
  <div className={styles.gradcam}>
 
287
  </p>
288
  </div>
289
  <div style={{ flex: 1 }}>
290
+ <div className={styles.mainResult}>
291
+ <p><strong>Status:</strong>
292
+ <span className={result.is_deepfake ? styles.fake : styles.real}>
293
+ {result.is_deepfake ? '🚨 DEEPFAKE DETECTED' : 'βœ… APPEARS AUTHENTIC'}
294
+ </span>
295
+ </p>
296
+ <p><strong>Confidence:</strong> {(result.confidence * 100).toFixed(1)}%</p>
297
+ <p><strong>Fake Probability:</strong> {(result.fake_probability * 100).toFixed(1)}%</p>
298
+ <p><strong>File Type:</strong> {result.file_type}</p>
299
+ </div>
300
+
301
+ <h4 style={{paddingTop:'20px', margin: '0 0 8px 0', color: '#5eead4', fontSize: '1.05rem', fontWeight: 600 }}>πŸ€– AI Explanation</h4>
302
  {loadingExplanation ? (
303
  <div className={styles.loadingExplain}>
304
  <div className={styles.loadingSpinner}></div>
 
317
  </div>
318
  </div>
319
  )}
320
+
321
+
322
+
323
+
324
+ {/* Frame Analysis for Videos */}
325
+ {result.file_type === 'video' && result.fake_frames && result.fake_frames.length > 0 && (
326
+ <div className={styles.frameAnalysis}>
327
+ <h4>🎬 Suspicious Frames Detected</h4>
328
+ <p>The following frames were flagged as potentially manipulated:</p>
329
+ <div className={styles.frameList}>
330
+ {result.fake_frames.map((frame, index) => (
331
+ <div key={index} className={styles.frameItem}>
332
+ Frame {frame}
333
+ </div>
334
+ ))}
335
+ </div>
336
+ </div>
337
+ )}
338
+
339
+
340
  </div>
341
  </div>
342
  )}
frontend/src/Components/UploadBox.module.css CHANGED
@@ -139,6 +139,7 @@
139
 
140
  .mainResult {
141
  background: #334155;
 
142
  padding: 20px;
143
  border-radius: 8px;
144
  border: 1px solid #475569;
 
139
 
140
  .mainResult {
141
  background: #334155;
142
+ margin-top: 13px;
143
  padding: 20px;
144
  border-radius: 8px;
145
  border: 1px solid #475569;