yeq6x commited on
Commit
cc0703f
·
1 Parent(s): 47e49ef
Files changed (2) hide show
  1. a.py +12 -0
  2. app.py +2 -2
a.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ x = 10
3
+
4
+ def func():
5
+ print(x)
6
+
7
+ def func2():
8
+ global x
9
+ x = 20
10
+
11
+ func2()
12
+ func()
app.py CHANGED
@@ -87,7 +87,7 @@ for model_info in models_info:
87
 
88
  x = load_data()
89
  test_imgs, points = load_keypoints()
90
- mean_vectors_list = []
91
  model_index = 0
92
 
93
  # ヒートマップの生成関数
@@ -149,7 +149,6 @@ def setup(model_info, input_image=None):
149
 
150
  feature_map, _ = models[model_index](test_imgs)
151
  mean_vector_list = utils.get_mean_vector(feature_map, points)
152
- print("mean_vector_list", mean_vector_list)
153
 
154
  if input_image is not None:
155
  fig = get_heatmaps(0, image_size // 2, image_size // 2, input_image)
@@ -207,6 +206,7 @@ with gr.Blocks() as demo:
207
  )
208
 
209
  setup(models_info[0])
 
210
 
211
  demo.launch()
212
 
 
87
 
88
  x = load_data()
89
  test_imgs, points = load_keypoints()
90
+ mean_vector_list = []
91
  model_index = 0
92
 
93
  # ヒートマップの生成関数
 
149
 
150
  feature_map, _ = models[model_index](test_imgs)
151
  mean_vector_list = utils.get_mean_vector(feature_map, points)
 
152
 
153
  if input_image is not None:
154
  fig = get_heatmaps(0, image_size // 2, image_size // 2, input_image)
 
206
  )
207
 
208
  setup(models_info[0])
209
+ print(mean_vector_list)
210
 
211
  demo.launch()
212