Spaces:
Running
on
T4
Running
on
T4
Moved __future__ imports to the top
Browse files
app.py
CHANGED
@@ -1,8 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import spaces
|
2 |
import gradio as gr
|
3 |
import copy
|
4 |
import random
|
5 |
import torch
|
|
|
|
|
6 |
import PIL
|
7 |
from PIL import Image, ImageDraw, ImageFont
|
8 |
import torchvision.transforms.functional as F
|
@@ -51,17 +58,6 @@ CONF_THRESH = 0.23
|
|
51 |
|
52 |
@spaces.GPU
|
53 |
def check_ms_deform_install():
|
54 |
-
from __future__ import absolute_import
|
55 |
-
from __future__ import print_function
|
56 |
-
from __future__ import division
|
57 |
-
|
58 |
-
import time
|
59 |
-
import torch
|
60 |
-
import torch.nn as nn
|
61 |
-
from torch.autograd import gradcheck
|
62 |
-
|
63 |
-
from functions.ms_deform_attn_func import MSDeformAttnFunction, ms_deform_attn_core_pytorch
|
64 |
-
|
65 |
|
66 |
N, M, D = 1, 2, 2
|
67 |
Lq, L, P = 2, 2, 2
|
|
|
1 |
+
from __future__ import absolute_import
|
2 |
+
from __future__ import print_function
|
3 |
+
from __future__ import division
|
4 |
+
from torch.autograd import gradcheck
|
5 |
+
from functions.ms_deform_attn_func import MSDeformAttnFunction, ms_deform_attn_core_pytorch
|
6 |
import spaces
|
7 |
import gradio as gr
|
8 |
import copy
|
9 |
import random
|
10 |
import torch
|
11 |
+
import torch.nn as nn
|
12 |
+
import time
|
13 |
import PIL
|
14 |
from PIL import Image, ImageDraw, ImageFont
|
15 |
import torchvision.transforms.functional as F
|
|
|
58 |
|
59 |
@spaces.GPU
|
60 |
def check_ms_deform_install():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
N, M, D = 1, 2, 2
|
63 |
Lq, L, P = 2, 2, 2
|