Spaces:
Sleeping
Sleeping
Upload 5 files
Browse files- app.py +25 -0
- audio/README.md +1 -0
- models/README.md +1 -0
- requirements.txt +7 -0
- video/README.md +1 -0
app.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import gradio as gr
|
| 3 |
+
import os
|
| 4 |
+
|
| 5 |
+
def analyze_lie(audio_file, video_file):
|
| 6 |
+
# Placeholder logic
|
| 7 |
+
score = 78 # simulate result
|
| 8 |
+
return f"Deception Score: {score}%", "Likely Deceptive" if score > 70 else "Likely Truthful"
|
| 9 |
+
|
| 10 |
+
iface = gr.Interface(
|
| 11 |
+
fn=analyze_lie,
|
| 12 |
+
inputs=[
|
| 13 |
+
gr.Audio(source="upload", type="filepath", label="Upload Audio"),
|
| 14 |
+
gr.Video(source="upload", label="Upload Video")
|
| 15 |
+
],
|
| 16 |
+
outputs=[
|
| 17 |
+
gr.Textbox(label="Deception Score"),
|
| 18 |
+
gr.Textbox(label="Verdict")
|
| 19 |
+
],
|
| 20 |
+
title="Lie Detection System",
|
| 21 |
+
description="Upload a voice and video sample to analyze deception likelihood"
|
| 22 |
+
)
|
| 23 |
+
|
| 24 |
+
if __name__ == "__main__":
|
| 25 |
+
iface.launch()
|
audio/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
# Audio processing scripts here
|
models/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
# Place any pre-trained models here
|
requirements.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
gradio
|
| 3 |
+
opencv-python
|
| 4 |
+
mediapipe
|
| 5 |
+
pyAudioAnalysis
|
| 6 |
+
torch
|
| 7 |
+
transformers
|
video/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
# Video processing scripts here
|