Update app.py
Browse files
app.py
CHANGED
@@ -88,3 +88,27 @@ def predict_pipeline(img_input,
|
|
88 |
pose_cfg_dict = yaml.safe_load(stream)
|
89 |
map_label_id_to_str = dict([(k,v) for k,v in zip([el[0] for el in pose_cfg_dict['all_joints']], # pose_cfg_dict['all_joints'] is a list of one-element lists,
|
90 |
pose_cfg_dict['all_joints_names'])])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
pose_cfg_dict = yaml.safe_load(stream)
|
89 |
map_label_id_to_str = dict([(k,v) for k,v in zip([el[0] for el in pose_cfg_dict['all_joints']], # pose_cfg_dict['all_joints'] is a list of one-element lists,
|
90 |
pose_cfg_dict['all_joints_names'])])
|
91 |
+
|
92 |
+
|
93 |
+
|
94 |
+
|
95 |
+
|
96 |
+
#########################################################
|
97 |
+
# Define user interface and launch
|
98 |
+
inputs = gradio_inputs_for_MD_DLC(list(MD_models_dict.keys()),
|
99 |
+
list(DLC_models_dict.keys()))
|
100 |
+
outputs = gradio_outputs_for_MD_DLC()
|
101 |
+
[gr_title,
|
102 |
+
gr_description,
|
103 |
+
examples] = gradio_description_and_examples()
|
104 |
+
|
105 |
+
# launch
|
106 |
+
demo = gr.Interface(predict_pipeline,
|
107 |
+
inputs=inputs,
|
108 |
+
outputs=outputs,
|
109 |
+
title=gr_title,
|
110 |
+
description=gr_description,
|
111 |
+
examples=examples,
|
112 |
+
theme="huggingface")
|
113 |
+
|
114 |
+
demo.launch(enable_queue=True, share=True)
|