thecho7 commited on
Commit
2d342d0
·
1 Parent(s): da202d4

global model

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,7 +26,7 @@ def convert_result(pred, class_names=["Real", "Fake"]):
26
  assert len(class_names) == len(preds), "Class / Prediction should have the same length"
27
  return {n: p for n, p in zip(class_names, preds)}
28
 
29
- def predict_fn(model, video, meta):
30
  start = time.time()
31
  prediction = predict_on_video(face_extractor=meta["face_extractor"],
32
  video_path=video,
@@ -75,7 +75,7 @@ if __name__ == '__main__':
75
  """
76
  # Create the Gradio demo
77
  demo = gr.Interface(fn=predict_fn, # mapping function from input to output
78
- inputs=[model, gr.Video(), meta],
79
  outputs=[gr.Label(num_top_classes=2, label="Predictions"), # what are the outputs?
80
  gr.Number(label="Prediction time (s)")], # our fn has two outputs, therefore we have two outputs
81
  examples=example_list,
 
26
  assert len(class_names) == len(preds), "Class / Prediction should have the same length"
27
  return {n: p for n, p in zip(class_names, preds)}
28
 
29
+ def predict_fn(video, meta):
30
  start = time.time()
31
  prediction = predict_on_video(face_extractor=meta["face_extractor"],
32
  video_path=video,
 
75
  """
76
  # Create the Gradio demo
77
  demo = gr.Interface(fn=predict_fn, # mapping function from input to output
78
+ inputs=[gr.Video(), meta],
79
  outputs=[gr.Label(num_top_classes=2, label="Predictions"), # what are the outputs?
80
  gr.Number(label="Prediction time (s)")], # our fn has two outputs, therefore we have two outputs
81
  examples=example_list,