yeq6x commited on
Commit
9864446
·
1 Parent(s): 8d302a0
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -93,6 +93,7 @@ model_index = 0
93
  # ヒートマップの生成関数
94
  @spaces.GPU
95
  def get_heatmaps(source_num, x_coords, y_coords, uploaded_image):
 
96
  if type(uploaded_image) == str:
97
  uploaded_image = Image.open(uploaded_image)
98
  if type(source_num) == str:
@@ -152,6 +153,8 @@ def setup(model_info, input_image=None):
152
  if input_image is not None:
153
  fig = get_heatmaps(0, image_size // 2, image_size // 2, input_image)
154
  return fig
 
 
155
 
156
  with gr.Blocks() as demo:
157
  # title
 
93
  # ヒートマップの生成関数
94
  @spaces.GPU
95
  def get_heatmaps(source_num, x_coords, y_coords, uploaded_image):
96
+ global model_index, mean_vector_list
97
  if type(uploaded_image) == str:
98
  uploaded_image = Image.open(uploaded_image)
99
  if type(source_num) == str:
 
153
  if input_image is not None:
154
  fig = get_heatmaps(0, image_size // 2, image_size // 2, input_image)
155
  return fig
156
+
157
+ print("setup done.")
158
 
159
  with gr.Blocks() as demo:
160
  # title