Spaces:
Build error
Build error
Add queue
#3
by
mrfakename
- opened
app.py
CHANGED
@@ -27,7 +27,7 @@ print(torch.cuda.get_device_name(index))
|
|
27 |
from main.inference import Inferer
|
28 |
inferer = Inferer(DEFAULT_MODEL, num_gpus, OUT_FOLDER)
|
29 |
|
30 |
-
@spaces.GPU
|
31 |
def infer(video_input, in_threshold=0.5, num_people="Single person", render_mesh=False):
|
32 |
os.system(f'rm -rf {OUT_FOLDER}/*')
|
33 |
multi_person = False if (num_people == "Single person") else True
|
@@ -131,4 +131,4 @@ with gr.Blocks(title="SMPLer-X", css=".gradio-container") as demo:
|
|
131 |
inputs=[video_input, 0.5])
|
132 |
|
133 |
#demo.queue()
|
134 |
-
demo.launch(debug=True)
|
|
|
27 |
from main.inference import Inferer
|
28 |
inferer = Inferer(DEFAULT_MODEL, num_gpus, OUT_FOLDER)
|
29 |
|
30 |
+
@spaces.GPU(enable_queue=True)
|
31 |
def infer(video_input, in_threshold=0.5, num_people="Single person", render_mesh=False):
|
32 |
os.system(f'rm -rf {OUT_FOLDER}/*')
|
33 |
multi_person = False if (num_people == "Single person") else True
|
|
|
131 |
inputs=[video_input, 0.5])
|
132 |
|
133 |
#demo.queue()
|
134 |
+
demo.queue().launch(debug=True)
|