Spaces:
Running
Running
Commit
·
0fd6cea
1
Parent(s):
a2b9d20
feat: update doc
Browse files
app.py
CHANGED
@@ -123,11 +123,14 @@ with gr.Blocks(
|
|
123 |
with gr.Column(elem_classes="container"):
|
124 |
gr.Markdown(
|
125 |
"""
|
126 |
-
# Interactive
|
127 |
|
128 |
-
##
|
129 |
-
|
130 |
-
|
|
|
|
|
|
|
131 |
"""
|
132 |
)
|
133 |
|
@@ -144,12 +147,13 @@ with gr.Blocks(
|
|
144 |
gr.Markdown(
|
145 |
"""
|
146 |
### How to Use
|
147 |
-
1. Choose a pattern
|
148 |
-
2. View the
|
149 |
-
3.
|
150 |
-
4.
|
|
|
151 |
|
152 |
-
Use the "Find Optimal Latent" button to
|
153 |
"""
|
154 |
)
|
155 |
|
@@ -167,9 +171,9 @@ with gr.Blocks(
|
|
167 |
interactive=True,
|
168 |
)
|
169 |
|
170 |
-
gr.Markdown("###
|
171 |
gr.Markdown(
|
172 |
-
"Click anywhere in the
|
173 |
)
|
174 |
|
175 |
with gr.Column(elem_classes="coordinate-container"):
|
@@ -188,7 +192,7 @@ with gr.Blocks(
|
|
188 |
|
189 |
# Right column for images
|
190 |
with gr.Column(scale=1):
|
191 |
-
gr.Markdown("###
|
192 |
with gr.Column(elem_classes="image-preview-container"):
|
193 |
reference_image = gr.Image(
|
194 |
value="imgs/pattern_0.png",
|
@@ -211,8 +215,6 @@ with gr.Blocks(
|
|
211 |
gr.Markdown(
|
212 |
"""
|
213 |
### Technical Details
|
214 |
-
Our approach uses a novel coordinate-conditioning mechanism that allows precise control over the generated patterns.
|
215 |
-
The heatmap visualization shows the distribution of pattern characteristics across the latent space.
|
216 |
|
217 |
For more information, please refer to our [paper](https://arxiv.org/pdf/2411.08706) or GitHub [repository](https://github.com/clement-bonnet/lpn).
|
218 |
"""
|
|
|
123 |
with gr.Column(elem_classes="container"):
|
124 |
gr.Markdown(
|
125 |
"""
|
126 |
+
# Interactive Visualization of a Latent Program Network (LPN)
|
127 |
|
128 |
+
## Introduction
|
129 |
+
The LPN is an architecture for inductive program synthesis that builds in test-time adaption
|
130 |
+
by learning a latent space that can be used for search.
|
131 |
+
This interactive demo showcases a latent traversal of the LPN in the latent program space.
|
132 |
+
More specifically, the decoder of the LPN is conditioned on a latent vector representing
|
133 |
+
an abstract program, which is then used to generate an output.
|
134 |
"""
|
135 |
)
|
136 |
|
|
|
147 |
gr.Markdown(
|
148 |
"""
|
149 |
### How to Use
|
150 |
+
1. Choose a pattern task using the radio buttons
|
151 |
+
2. View the input-output pairs for your selected task
|
152 |
+
3. The goal is to find the latent that will generate the right third image for the given input
|
153 |
+
4. Click anywhere in the heatmap to specify coordinates in the latent space
|
154 |
+
5. See the generated image based on your selection
|
155 |
|
156 |
+
Use the "Find Optimal Latent" button to find the latent that maximizes likelihood of generating the other input-output pairs.
|
157 |
"""
|
158 |
)
|
159 |
|
|
|
171 |
interactive=True,
|
172 |
)
|
173 |
|
174 |
+
gr.Markdown("### Latent Space Search")
|
175 |
gr.Markdown(
|
176 |
+
"Click anywhere in the 2D latent space below to condition the decoder on a specific latent vector."
|
177 |
)
|
178 |
|
179 |
with gr.Column(elem_classes="coordinate-container"):
|
|
|
192 |
|
193 |
# Right column for images
|
194 |
with gr.Column(scale=1):
|
195 |
+
gr.Markdown("### Input-Output Pairs")
|
196 |
with gr.Column(elem_classes="image-preview-container"):
|
197 |
reference_image = gr.Image(
|
198 |
value="imgs/pattern_0.png",
|
|
|
215 |
gr.Markdown(
|
216 |
"""
|
217 |
### Technical Details
|
|
|
|
|
218 |
|
219 |
For more information, please refer to our [paper](https://arxiv.org/pdf/2411.08706) or GitHub [repository](https://github.com/clement-bonnet/lpn).
|
220 |
"""
|