Muhammad Haris commited on
Commit
e3e6bf8
1 Parent(s): e8660cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -1,11 +1,4 @@
1
- import os
2
- os.environ['TF_ENABLE_ONEDNN_OPTS'] = '0'
3
-
4
- import tensorflow as tf
5
- import cv2
6
- import numpy as np
7
- import math
8
- import gradio as gr
9
 
10
  class ShopliftingPrediction:
11
  def __init__(self, model_path, frame_width, frame_height, sequence_length):
@@ -91,7 +84,7 @@ process_video = inference(model_path)
91
 
92
  iface = gr.Interface(
93
  fn=process_video,
94
- inputs=gr.inputs.Video(),
95
  outputs="video",
96
  live=True,
97
  capture_session=True # Ensures the video stream is captured properly
 
1
+ from moviepy.editor import VideoFileClip
 
 
 
 
 
 
 
2
 
3
  class ShopliftingPrediction:
4
  def __init__(self, model_path, frame_width, frame_height, sequence_length):
 
84
 
85
  iface = gr.Interface(
86
  fn=process_video,
87
+ inputs=gr.interfaces.Video(),
88
  outputs="video",
89
  live=True,
90
  capture_session=True # Ensures the video stream is captured properly