Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,7 @@ import gradio as gr
|
|
| 5 |
import logging
|
| 6 |
from moviepy.editor import VideoFileClip
|
| 7 |
import torch
|
|
|
|
| 8 |
|
| 9 |
ACCESS_KEY = os.getenv("ACCESS_KEY")
|
| 10 |
|
|
@@ -68,6 +69,7 @@ clone_repo()
|
|
| 68 |
backend = import_backend_script("app.py")
|
| 69 |
analyzer = backend.DeepfakeAnalyzer()
|
| 70 |
|
|
|
|
| 71 |
def analyze_video(video_file):
|
| 72 |
if ACCESS_KEY is None:
|
| 73 |
logging.error("Access key not set in environment variables.")
|
|
|
|
| 5 |
import logging
|
| 6 |
from moviepy.editor import VideoFileClip
|
| 7 |
import torch
|
| 8 |
+
import spaces
|
| 9 |
|
| 10 |
ACCESS_KEY = os.getenv("ACCESS_KEY")
|
| 11 |
|
|
|
|
| 69 |
backend = import_backend_script("app.py")
|
| 70 |
analyzer = backend.DeepfakeAnalyzer()
|
| 71 |
|
| 72 |
+
@spaces.GPU(duration=3000)
|
| 73 |
def analyze_video(video_file):
|
| 74 |
if ACCESS_KEY is None:
|
| 75 |
logging.error("Access key not set in environment variables.")
|