Spaces:
Running
on
Zero
Running
on
Zero
xiaoyuxi
commited on
Commit
·
f86f176
1
Parent(s):
67a6cc9
vggt_da
Browse files
app.py
CHANGED
|
@@ -15,6 +15,12 @@ import zlib
|
|
| 15 |
from pathlib import Path
|
| 16 |
from einops import rearrange
|
| 17 |
from typing import List, Tuple, Union
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
import torch
|
| 19 |
import logging
|
| 20 |
from concurrent.futures import ThreadPoolExecutor
|
|
@@ -33,13 +39,6 @@ except ImportError as e:
|
|
| 33 |
logger.error(f"Failed to import custom modules: {e}")
|
| 34 |
raise
|
| 35 |
|
| 36 |
-
try:
|
| 37 |
-
import spaces
|
| 38 |
-
except ImportError:
|
| 39 |
-
# Fallback for local development
|
| 40 |
-
def spaces(func):
|
| 41 |
-
return func
|
| 42 |
-
|
| 43 |
# Constants
|
| 44 |
MAX_FRAMES = 80
|
| 45 |
COLORS = [(0, 0, 255), (0, 255, 255)] # BGR: Red for negative, Yellow for positive
|
|
|
|
| 15 |
from pathlib import Path
|
| 16 |
from einops import rearrange
|
| 17 |
from typing import List, Tuple, Union
|
| 18 |
+
try:
|
| 19 |
+
import spaces
|
| 20 |
+
except ImportError:
|
| 21 |
+
# Fallback for local development
|
| 22 |
+
def spaces(func):
|
| 23 |
+
return func
|
| 24 |
import torch
|
| 25 |
import logging
|
| 26 |
from concurrent.futures import ThreadPoolExecutor
|
|
|
|
| 39 |
logger.error(f"Failed to import custom modules: {e}")
|
| 40 |
raise
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
# Constants
|
| 43 |
MAX_FRAMES = 80
|
| 44 |
COLORS = [(0, 0, 255), (0, 255, 255)] # BGR: Red for negative, Yellow for positive
|