Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -18,6 +18,7 @@ from queue import Queue as BlockingQueue
|
|
18 |
|
19 |
# external
|
20 |
|
|
|
21 |
import torch
|
22 |
import gradio as gr
|
23 |
from numpy import asarray as array
|
@@ -305,7 +306,8 @@ def translate(text,lang):
|
|
305 |
def generate_random_string(length):
|
306 |
characters = str(ascii_letters + digits)
|
307 |
return ''.join(random.choice(characters) for _ in range(length))
|
308 |
-
|
|
|
309 |
def calc(img,p1,p2,motion):
|
310 |
global last_motion
|
311 |
global pipe
|
|
|
18 |
|
19 |
# external
|
20 |
|
21 |
+
import spaces
|
22 |
import torch
|
23 |
import gradio as gr
|
24 |
from numpy import asarray as array
|
|
|
306 |
def generate_random_string(length):
|
307 |
characters = str(ascii_letters + digits)
|
308 |
return ''.join(random.choice(characters) for _ in range(length))
|
309 |
+
|
310 |
+
@spaces.GPU(duration=120)
|
311 |
def calc(img,p1,p2,motion):
|
312 |
global last_motion
|
313 |
global pipe
|