Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# Import necessary libraries
|
2 |
import gradio as gr # Gradio is used to create web interfaces for Python scripts.
|
3 |
from transformers import AutoConfig # AutoConfig is from the Hugging Face Transformers library, used to create configuration for various models.
|
@@ -87,7 +123,7 @@ with gr.Blocks(css=custom_css) as demo:
|
|
87 |
import gradio as gr
|
88 |
|
89 |
def generate_grid():
|
90 |
-
with gr.Blocks(label="The Big Gridio", elem_class="layout", elem_id="grid-lg") as grid:
|
91 |
for row in range(12):
|
92 |
with gr.Row() as row_container:
|
93 |
for col in range(12):
|
|
|
1 |
+
"""
|
2 |
+
/* Define the background colors for dark and light squares */
|
3 |
+
.dark-square {
|
4 |
+
background-color: #555;
|
5 |
+
}
|
6 |
+
|
7 |
+
.light-square {
|
8 |
+
background-color: #ccc;
|
9 |
+
}
|
10 |
+
|
11 |
+
/* Style the column containers to have the appropriate background color */
|
12 |
+
.col {
|
13 |
+
flex: 1 0 8.33333%;
|
14 |
+
margin: 0 5px;
|
15 |
+
text-align: center;
|
16 |
+
padding: 10px;
|
17 |
+
}
|
18 |
+
|
19 |
+
/* Alternate the background colors between dark and light squares */
|
20 |
+
.layout .col:nth-child(odd) .col:nth-child(odd) {
|
21 |
+
background-color: #555;
|
22 |
+
}
|
23 |
+
|
24 |
+
.layout .col:nth-child(even) .col:nth-child(odd) {
|
25 |
+
background-color: #ccc;
|
26 |
+
}
|
27 |
+
|
28 |
+
.layout .col:nth-child(odd) .col:nth-child(even) {
|
29 |
+
background-color: #ccc;
|
30 |
+
}
|
31 |
+
|
32 |
+
.layout .col:nth-child(even) .col:nth-child(even) {
|
33 |
+
background-color: #555;
|
34 |
+
}
|
35 |
+
"""
|
36 |
+
|
37 |
# Import necessary libraries
|
38 |
import gradio as gr # Gradio is used to create web interfaces for Python scripts.
|
39 |
from transformers import AutoConfig # AutoConfig is from the Hugging Face Transformers library, used to create configuration for various models.
|
|
|
123 |
import gradio as gr
|
124 |
|
125 |
def generate_grid():
|
126 |
+
with gr.Blocks(css=css, label="The Big Gridio", elem_class="layout", elem_id="grid-lg") as grid:
|
127 |
for row in range(12):
|
128 |
with gr.Row() as row_container:
|
129 |
for col in range(12):
|