Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ import gradio as gr
|
|
| 7 |
from model import ImprovedEfficientViT # custom model architecture
|
| 8 |
from inference import predict_vedio # custom video inference function
|
| 9 |
|
| 10 |
-
# --- Force CPU-only to prevent CUDA/TensorFlow errors ---
|
| 11 |
os.environ["CUDA_VISIBLE_DEVICES"] = ""
|
| 12 |
device = "cpu"
|
| 13 |
|
|
@@ -44,7 +44,7 @@ with gr.Blocks() as app:
|
|
| 44 |
gr.Markdown("# 🔍 Deepfake Detector (EfficientViT, CPU-only)")
|
| 45 |
|
| 46 |
with gr.Row():
|
| 47 |
-
video_input = gr.Video(label="Upload Video",
|
| 48 |
output_text = gr.Textbox(label="Prediction")
|
| 49 |
output_video = gr.Video(label="Uploaded Video Preview")
|
| 50 |
|
|
|
|
| 7 |
from model import ImprovedEfficientViT # custom model architecture
|
| 8 |
from inference import predict_vedio # custom video inference function
|
| 9 |
|
| 10 |
+
# --- Force CPU-only to prevent CUDA/TensorFlow GPU errors ---
|
| 11 |
os.environ["CUDA_VISIBLE_DEVICES"] = ""
|
| 12 |
device = "cpu"
|
| 13 |
|
|
|
|
| 44 |
gr.Markdown("# 🔍 Deepfake Detector (EfficientViT, CPU-only)")
|
| 45 |
|
| 46 |
with gr.Row():
|
| 47 |
+
video_input = gr.Video(label="Upload Video", source="upload") # updated
|
| 48 |
output_text = gr.Textbox(label="Prediction")
|
| 49 |
output_video = gr.Video(label="Uploaded Video Preview")
|
| 50 |
|