Spaces:
Sleeping
Sleeping
並び替え
Browse files
app.py
CHANGED
@@ -88,10 +88,13 @@ for model_info in models_info:
|
|
88 |
|
89 |
x = load_data()
|
90 |
test_imgs, points = load_keypoints()
|
|
|
91 |
|
92 |
# ヒートマップの生成関数
|
93 |
@spaces.GPU
|
94 |
def get_heatmaps(source_num, x_coords, y_coords, uploaded_image):
|
|
|
|
|
95 |
if type(uploaded_image) == str:
|
96 |
uploaded_image = Image.open(uploaded_image)
|
97 |
if type(source_num) == str:
|
@@ -206,6 +209,5 @@ if __name__ == "__main__":
|
|
206 |
|
207 |
setup(models_info[0])
|
208 |
|
209 |
-
# JavaScriptコードをロード
|
210 |
demo.launch()
|
211 |
|
|
|
88 |
|
89 |
x = load_data()
|
90 |
test_imgs, points = load_keypoints()
|
91 |
+
model = None
|
92 |
|
93 |
# ヒートマップの生成関数
|
94 |
@spaces.GPU
|
95 |
def get_heatmaps(source_num, x_coords, y_coords, uploaded_image):
|
96 |
+
global model, mean_vector_list
|
97 |
+
|
98 |
if type(uploaded_image) == str:
|
99 |
uploaded_image = Image.open(uploaded_image)
|
100 |
if type(source_num) == str:
|
|
|
209 |
|
210 |
setup(models_info[0])
|
211 |
|
|
|
212 |
demo.launch()
|
213 |
|