Commit
·
58cf812
1
Parent(s):
b44a3bf
feat: Replace custom CSS with Gradio's built-in styling for columns
Browse files
app.py
CHANGED
@@ -57,32 +57,21 @@ if __name__ == "__main__":
|
|
57 |
)
|
58 |
|
59 |
with gr.Row():
|
60 |
-
with gr.Column(
|
|
|
|
|
|
|
|
|
|
|
61 |
text1 = gr.Markdown()
|
62 |
-
with gr.Column(
|
|
|
|
|
|
|
|
|
|
|
63 |
text2 = gr.Markdown()
|
64 |
|
65 |
-
# Add custom CSS
|
66 |
-
gr.Markdown(
|
67 |
-
"""
|
68 |
-
<style>
|
69 |
-
#column1, #column2 {
|
70 |
-
border: 2px solid #ddd;
|
71 |
-
border-radius: 10px;
|
72 |
-
padding: 10px;
|
73 |
-
margin: 10px;
|
74 |
-
background-color: #f9f9f9;
|
75 |
-
}
|
76 |
-
#column1 {
|
77 |
-
border-color: #007bff;
|
78 |
-
}
|
79 |
-
#column2 {
|
80 |
-
border-color: #28a745;
|
81 |
-
}
|
82 |
-
</style>
|
83 |
-
"""
|
84 |
-
)
|
85 |
-
|
86 |
def update_representations(*args):
|
87 |
text1_content, text2_content = display_representations(*args)
|
88 |
return (
|
|
|
57 |
)
|
58 |
|
59 |
with gr.Row():
|
60 |
+
with gr.Column(
|
61 |
+
elem_id="column1",
|
62 |
+
variant="panel",
|
63 |
+
scale=1,
|
64 |
+
min_width=300,
|
65 |
+
):
|
66 |
text1 = gr.Markdown()
|
67 |
+
with gr.Column(
|
68 |
+
elem_id="column2",
|
69 |
+
variant="panel",
|
70 |
+
scale=1,
|
71 |
+
min_width=300,
|
72 |
+
):
|
73 |
text2 = gr.Markdown()
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
def update_representations(*args):
|
76 |
text1_content, text2_content = display_representations(*args)
|
77 |
return (
|