Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -34,3 +34,11 @@ app = FastAPI(dependencies=[Depends(verify_internal_token)])
|
|
34 |
def ping():
|
35 |
subprocess.Popen(['python', '/tmp/download.py'])
|
36 |
return True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
def ping():
|
35 |
subprocess.Popen(['python', '/tmp/download.py'])
|
36 |
return True
|
37 |
+
|
38 |
+
@app.post("/download")
|
39 |
+
def ping(args:dict):
|
40 |
+
id = args['id']
|
41 |
+
url = args['url']
|
42 |
+
callback=args['callback']
|
43 |
+
subprocess.Popen(['python', '/tmp/download.py',str(id),url,callback])
|
44 |
+
return True
|