vu0018 commited on
Commit
dacd9ca
·
verified ·
1 Parent(s): d85ae3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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", type="filepath", file_types=["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