Spaces:
Sleeping
Sleeping
並び替え
Browse files
app.py
CHANGED
@@ -77,7 +77,7 @@ models_info = [
|
|
77 |
{"name": "autoencoder-epoch=29-train_loss=1.01.ckpt", "feature_dim": 64},
|
78 |
{"name": "autoencoder-epoch=09-train_loss=1.00.ckpt", "feature_dim": 64},
|
79 |
{"name": "ae_model_tf_2024-03-05_00-35-21.pth", "feature_dim": 32},
|
80 |
-
|
81 |
models = []
|
82 |
for model_info in models_info:
|
83 |
model_name = model_info["name"]
|
@@ -155,6 +155,8 @@ def setup(model_info, input_image=None):
|
|
155 |
if input_image is not None:
|
156 |
fig = get_heatmaps(0, image_size // 2, image_size // 2, input_image)
|
157 |
return fig
|
|
|
|
|
158 |
|
159 |
with gr.Blocks() as demo:
|
160 |
# title
|
@@ -205,9 +207,5 @@ with gr.Blocks() as demo:
|
|
205 |
inputs=[input_image],
|
206 |
)
|
207 |
|
208 |
-
if __name__ == "__main__":
|
209 |
-
|
210 |
-
setup(models_info[0])
|
211 |
-
|
212 |
demo.launch()
|
213 |
|
|
|
77 |
{"name": "autoencoder-epoch=29-train_loss=1.01.ckpt", "feature_dim": 64},
|
78 |
{"name": "autoencoder-epoch=09-train_loss=1.00.ckpt", "feature_dim": 64},
|
79 |
{"name": "ae_model_tf_2024-03-05_00-35-21.pth", "feature_dim": 32},
|
80 |
+
]
|
81 |
models = []
|
82 |
for model_info in models_info:
|
83 |
model_name = model_info["name"]
|
|
|
155 |
if input_image is not None:
|
156 |
fig = get_heatmaps(0, image_size // 2, image_size // 2, input_image)
|
157 |
return fig
|
158 |
+
|
159 |
+
setup(models_info[0])
|
160 |
|
161 |
with gr.Blocks() as demo:
|
162 |
# title
|
|
|
207 |
inputs=[input_image],
|
208 |
)
|
209 |
|
|
|
|
|
|
|
|
|
210 |
demo.launch()
|
211 |
|