sdafd commited on
Commit
c3a92aa
·
verified ·
1 Parent(s): 85b3f51

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -201,8 +201,9 @@ def process_video(video_path, num_frames):
201
  frame_results = []
202
 
203
  for frame_path in frames:
204
- print(f"https://sdafd-video-nsfw-detect-api.hf.space/file=/tmp/gradio/{frame_path}")
205
- nsfw_detected = check_nsfw_final(f"https://sdafd-video-nsfw-detect-api.hf.space/file=/tmp/gradio/{frame_path}")
 
206
  frame_results.append({
207
  "frame_path": frame_path,
208
  "nsfw_detected": nsfw_detected
 
201
  frame_results = []
202
 
203
  for frame_path in frames:
204
+ img_url = f"file://{frame_path}"
205
+ print(img_url)
206
+ nsfw_detected = check_nsfw_final(img_url)
207
  frame_results.append({
208
  "frame_path": frame_path,
209
  "nsfw_detected": nsfw_detected