Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -96,18 +96,39 @@ examples = [
|
|
96 |
|
97 |
# Custom CSS for better styling and centering
|
98 |
custom_css = """
|
99 |
-
/* Main container centering */
|
100 |
.gradio-container {
|
101 |
-
max-width:
|
102 |
margin: 0 auto !important;
|
103 |
padding: 20px !important;
|
104 |
}
|
105 |
|
106 |
/* Center all content */
|
107 |
.main-content {
|
108 |
-
max-width:
|
109 |
margin: 0 auto;
|
110 |
-
padding: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
}
|
112 |
|
113 |
/* Status message styling */
|
@@ -119,24 +140,18 @@ custom_css = """
|
|
119 |
font-weight: 500;
|
120 |
}
|
121 |
|
122 |
-
/* Center radio buttons */
|
123 |
-
.radio-group {
|
124 |
-
display: flex;
|
125 |
-
flex-direction: column;
|
126 |
-
align-items: center;
|
127 |
-
}
|
128 |
-
|
129 |
/* Better button styling */
|
130 |
.generate-btn {
|
131 |
margin: 20px auto;
|
132 |
display: block;
|
133 |
-
min-width:
|
|
|
134 |
}
|
135 |
|
136 |
/* Examples section */
|
137 |
.examples-section {
|
138 |
-
margin:
|
139 |
-
padding:
|
140 |
background-color: #fafbfc;
|
141 |
border-radius: 12px;
|
142 |
border: 1px solid #e1e5e9;
|
@@ -145,32 +160,19 @@ custom_css = """
|
|
145 |
/* Center examples title */
|
146 |
.examples-title {
|
147 |
text-align: center;
|
148 |
-
font-size: 1.
|
149 |
font-weight: 600;
|
150 |
-
margin-bottom:
|
151 |
color: #374151;
|
152 |
}
|
153 |
|
154 |
/* Footer styling */
|
155 |
.footer {
|
156 |
-
margin-top:
|
157 |
-
padding:
|
158 |
text-align: center;
|
159 |
border-top: 1px solid #e1e5e9;
|
160 |
}
|
161 |
-
|
162 |
-
/* Input components centering */
|
163 |
-
.input-section {
|
164 |
-
padding: 20px 0;
|
165 |
-
}
|
166 |
-
|
167 |
-
/* Audio output centering */
|
168 |
-
.audio-section {
|
169 |
-
display: flex;
|
170 |
-
flex-direction: column;
|
171 |
-
align-items: center;
|
172 |
-
padding: 20px;
|
173 |
-
}
|
174 |
"""
|
175 |
|
176 |
with gr.Blocks(
|
|
|
96 |
|
97 |
# Custom CSS for better styling and centering
|
98 |
custom_css = """
|
|
|
99 |
.gradio-container {
|
100 |
+
max-width: 1400px !important; /* wider overall */
|
101 |
margin: 0 auto !important;
|
102 |
padding: 20px !important;
|
103 |
}
|
104 |
|
105 |
/* Center all content */
|
106 |
.main-content {
|
107 |
+
max-width: 1400px; /* give more breathing space */
|
108 |
margin: 0 auto;
|
109 |
+
padding: 0 30px;
|
110 |
+
}
|
111 |
+
|
112 |
+
/* Make input, radio, and audio take full width */
|
113 |
+
.input-section textarea,
|
114 |
+
.input-section .wrap,
|
115 |
+
.audio-section audio {
|
116 |
+
width: 100% !important;
|
117 |
+
}
|
118 |
+
|
119 |
+
/* Radio buttons: horizontal pills */
|
120 |
+
.radio-group {
|
121 |
+
display: flex;
|
122 |
+
flex-direction: row; /* horizontal */
|
123 |
+
justify-content: center;
|
124 |
+
flex-wrap: wrap;
|
125 |
+
gap: 12px;
|
126 |
+
}
|
127 |
+
.radio-group label {
|
128 |
+
min-width: 120px;
|
129 |
+
padding: 10px 18px !important;
|
130 |
+
border-radius: 20px !important;
|
131 |
+
text-align: center;
|
132 |
}
|
133 |
|
134 |
/* Status message styling */
|
|
|
140 |
font-weight: 500;
|
141 |
}
|
142 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
/* Better button styling */
|
144 |
.generate-btn {
|
145 |
margin: 20px auto;
|
146 |
display: block;
|
147 |
+
min-width: 220px;
|
148 |
+
font-size: 1.1em;
|
149 |
}
|
150 |
|
151 |
/* Examples section */
|
152 |
.examples-section {
|
153 |
+
margin: 40px 0;
|
154 |
+
padding: 25px;
|
155 |
background-color: #fafbfc;
|
156 |
border-radius: 12px;
|
157 |
border: 1px solid #e1e5e9;
|
|
|
160 |
/* Center examples title */
|
161 |
.examples-title {
|
162 |
text-align: center;
|
163 |
+
font-size: 1.2em;
|
164 |
font-weight: 600;
|
165 |
+
margin-bottom: 18px;
|
166 |
color: #374151;
|
167 |
}
|
168 |
|
169 |
/* Footer styling */
|
170 |
.footer {
|
171 |
+
margin-top: 50px;
|
172 |
+
padding: 25px;
|
173 |
text-align: center;
|
174 |
border-top: 1px solid #e1e5e9;
|
175 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
"""
|
177 |
|
178 |
with gr.Blocks(
|