Spaces:
Running
Running
Commit
·
9f277f6
1
Parent(s):
a83dfee
feat: lpn diagram right size
Browse files
app.py
CHANGED
@@ -54,33 +54,41 @@ with gr.Blocks(
|
|
54 |
margin-right: auto !important;
|
55 |
padding: 0 1rem !important;
|
56 |
}
|
|
|
57 |
.diagram-container {
|
58 |
-
width:
|
59 |
-
max-width:
|
60 |
-
margin
|
61 |
-
margin-right: auto !important;
|
62 |
}
|
|
|
63 |
.diagram-container img {
|
64 |
width: 100% !important;
|
65 |
height: auto !important;
|
66 |
-
|
|
|
|
|
67 |
}
|
|
|
68 |
.radio-container {
|
69 |
width: 100% !important;
|
70 |
max-width: 450px !important;
|
71 |
margin-bottom: 1rem !important;
|
72 |
}
|
73 |
-
|
|
|
74 |
width: 100% !important;
|
75 |
aspect-ratio: 1 !important;
|
76 |
max-width: 450px !important;
|
77 |
margin-bottom: 1rem !important;
|
78 |
}
|
79 |
-
|
|
|
80 |
width: 100% !important;
|
81 |
height: 100% !important;
|
82 |
object-fit: contain !important;
|
|
|
83 |
}
|
|
|
84 |
.coordinate-container {
|
85 |
width: 100% !important;
|
86 |
aspect-ratio: 1 !important;
|
@@ -88,11 +96,13 @@ with gr.Blocks(
|
|
88 |
max-width: 450px !important;
|
89 |
margin-bottom: 1rem !important;
|
90 |
}
|
|
|
91 |
.coordinate-container img {
|
92 |
width: 100% !important;
|
93 |
height: 100% !important;
|
94 |
object-fit: contain !important;
|
95 |
}
|
|
|
96 |
.button-container {
|
97 |
width: 100% !important;
|
98 |
max-width: 450px !important;
|
@@ -100,12 +110,14 @@ with gr.Blocks(
|
|
100 |
justify-content: center !important;
|
101 |
margin-bottom: 1rem !important;
|
102 |
}
|
|
|
103 |
.documentation {
|
104 |
margin-top: 2rem !important;
|
105 |
padding: 1rem !important;
|
106 |
background-color: #f8f9fa !important;
|
107 |
border-radius: 8px !important;
|
108 |
}
|
|
|
109 |
.optimal-button {
|
110 |
width: 200px !important;
|
111 |
}
|
@@ -129,6 +141,7 @@ with gr.Blocks(
|
|
129 |
interactive=False,
|
130 |
show_download_button=False,
|
131 |
show_fullscreen_button=False,
|
|
|
132 |
)
|
133 |
|
134 |
gr.Markdown(
|
@@ -179,7 +192,7 @@ with gr.Blocks(
|
|
179 |
# Right column for images
|
180 |
with gr.Column(scale=1):
|
181 |
gr.Markdown("### Reference Pattern")
|
182 |
-
with gr.Column(elem_classes="image-container"):
|
183 |
reference_image = gr.Image(
|
184 |
value="imgs/pattern_0.png",
|
185 |
show_label=False,
|
@@ -189,7 +202,7 @@ with gr.Blocks(
|
|
189 |
)
|
190 |
|
191 |
gr.Markdown("### Generated Output")
|
192 |
-
with gr.Column(elem_classes="image-container"):
|
193 |
output_image = gr.Image(
|
194 |
show_label=False,
|
195 |
interactive=False,
|
|
|
54 |
margin-right: auto !important;
|
55 |
padding: 0 1rem !important;
|
56 |
}
|
57 |
+
|
58 |
.diagram-container {
|
59 |
+
width: 100% !important;
|
60 |
+
max-width: 1000px !important;
|
61 |
+
margin: 2rem auto !important;
|
|
|
62 |
}
|
63 |
+
|
64 |
.diagram-container img {
|
65 |
width: 100% !important;
|
66 |
height: auto !important;
|
67 |
+
display: block !important;
|
68 |
+
margin: 0 auto !important;
|
69 |
+
cursor: default !important;
|
70 |
}
|
71 |
+
|
72 |
.radio-container {
|
73 |
width: 100% !important;
|
74 |
max-width: 450px !important;
|
75 |
margin-bottom: 1rem !important;
|
76 |
}
|
77 |
+
|
78 |
+
.image-preview-container {
|
79 |
width: 100% !important;
|
80 |
aspect-ratio: 1 !important;
|
81 |
max-width: 450px !important;
|
82 |
margin-bottom: 1rem !important;
|
83 |
}
|
84 |
+
|
85 |
+
.image-preview-container img {
|
86 |
width: 100% !important;
|
87 |
height: 100% !important;
|
88 |
object-fit: contain !important;
|
89 |
+
cursor: default !important;
|
90 |
}
|
91 |
+
|
92 |
.coordinate-container {
|
93 |
width: 100% !important;
|
94 |
aspect-ratio: 1 !important;
|
|
|
96 |
max-width: 450px !important;
|
97 |
margin-bottom: 1rem !important;
|
98 |
}
|
99 |
+
|
100 |
.coordinate-container img {
|
101 |
width: 100% !important;
|
102 |
height: 100% !important;
|
103 |
object-fit: contain !important;
|
104 |
}
|
105 |
+
|
106 |
.button-container {
|
107 |
width: 100% !important;
|
108 |
max-width: 450px !important;
|
|
|
110 |
justify-content: center !important;
|
111 |
margin-bottom: 1rem !important;
|
112 |
}
|
113 |
+
|
114 |
.documentation {
|
115 |
margin-top: 2rem !important;
|
116 |
padding: 1rem !important;
|
117 |
background-color: #f8f9fa !important;
|
118 |
border-radius: 8px !important;
|
119 |
}
|
120 |
+
|
121 |
.optimal-button {
|
122 |
width: 200px !important;
|
123 |
}
|
|
|
141 |
interactive=False,
|
142 |
show_download_button=False,
|
143 |
show_fullscreen_button=False,
|
144 |
+
container=False,
|
145 |
)
|
146 |
|
147 |
gr.Markdown(
|
|
|
192 |
# Right column for images
|
193 |
with gr.Column(scale=1):
|
194 |
gr.Markdown("### Reference Pattern")
|
195 |
+
with gr.Column(elem_classes="image-preview-container"):
|
196 |
reference_image = gr.Image(
|
197 |
value="imgs/pattern_0.png",
|
198 |
show_label=False,
|
|
|
202 |
)
|
203 |
|
204 |
gr.Markdown("### Generated Output")
|
205 |
+
with gr.Column(elem_classes="image-preview-container"):
|
206 |
output_image = gr.Image(
|
207 |
show_label=False,
|
208 |
interactive=False,
|