Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -137,7 +137,7 @@ def run(*args):
|
|
137 |
dx = cuda.blockDim.x
|
138 |
pos = tx + bx * dx
|
139 |
|
140 |
-
cmd
|
141 |
|
142 |
result = subprocess.run(cmd, shell=True, capture_output=True, env=None)
|
143 |
if result.returncode != 0:
|
@@ -158,7 +158,7 @@ def translate(*args):
|
|
158 |
dx = cuda.blockDim.x
|
159 |
pos = tx + bx * dx
|
160 |
|
161 |
-
text,lang
|
162 |
|
163 |
if text == None or lang == None:
|
164 |
return ""
|
@@ -211,7 +211,7 @@ def generate_random_string(*args):
|
|
211 |
dx = cuda.blockDim.x
|
212 |
pos = tx + bx * dx
|
213 |
|
214 |
-
length
|
215 |
|
216 |
characters = string.ascii_letters + string.digits
|
217 |
return ''.join(random.choice(characters) for _ in range(length))
|
@@ -228,7 +228,7 @@ def Piper(*args):
|
|
228 |
dx = cuda.blockDim.x
|
229 |
pos = tx + bx * dx
|
230 |
|
231 |
-
image,positive,negative,motion
|
232 |
|
233 |
global last_motion
|
234 |
global ip_loaded
|
@@ -276,7 +276,7 @@ def infer(args):
|
|
276 |
dx = cuda.blockDim.x
|
277 |
pos = tx + bx * dx
|
278 |
|
279 |
-
pm =
|
280 |
|
281 |
print("infer: started")
|
282 |
|
@@ -309,7 +309,7 @@ def handle(*args):
|
|
309 |
dx = cuda.blockDim.x
|
310 |
pos = tx + bx * dx
|
311 |
|
312 |
-
i,m,p1,p2,*result
|
313 |
|
314 |
p1_en = translate[32,32](p1,"english")
|
315 |
p2_en = translate[32,32](p2,"english")
|
|
|
137 |
dx = cuda.blockDim.x
|
138 |
pos = tx + bx * dx
|
139 |
|
140 |
+
cmd=args[0]
|
141 |
|
142 |
result = subprocess.run(cmd, shell=True, capture_output=True, env=None)
|
143 |
if result.returncode != 0:
|
|
|
158 |
dx = cuda.blockDim.x
|
159 |
pos = tx + bx * dx
|
160 |
|
161 |
+
text,lang=args
|
162 |
|
163 |
if text == None or lang == None:
|
164 |
return ""
|
|
|
211 |
dx = cuda.blockDim.x
|
212 |
pos = tx + bx * dx
|
213 |
|
214 |
+
length=args[0]
|
215 |
|
216 |
characters = string.ascii_letters + string.digits
|
217 |
return ''.join(random.choice(characters) for _ in range(length))
|
|
|
228 |
dx = cuda.blockDim.x
|
229 |
pos = tx + bx * dx
|
230 |
|
231 |
+
image,positive,negative,motion=args
|
232 |
|
233 |
global last_motion
|
234 |
global ip_loaded
|
|
|
276 |
dx = cuda.blockDim.x
|
277 |
pos = tx + bx * dx
|
278 |
|
279 |
+
pm = args[0]
|
280 |
|
281 |
print("infer: started")
|
282 |
|
|
|
309 |
dx = cuda.blockDim.x
|
310 |
pos = tx + bx * dx
|
311 |
|
312 |
+
i,m,p1,p2,*result=args
|
313 |
|
314 |
p1_en = translate[32,32](p1,"english")
|
315 |
p2_en = translate[32,32](p2,"english")
|