Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,7 +102,6 @@ class GradioInterface:
|
|
| 102 |
def __init__(self, prompt_refiner: PromptRefiner):
|
| 103 |
self.prompt_refiner = prompt_refiner
|
| 104 |
custom_css = """
|
| 105 |
-
/* Main containers and borders */
|
| 106 |
.container {
|
| 107 |
border: 2px solid #2196F3;
|
| 108 |
border-radius: 10px;
|
|
@@ -112,7 +111,6 @@ class GradioInterface:
|
|
| 112 |
position: relative;
|
| 113 |
}
|
| 114 |
|
| 115 |
-
/* Container labels */
|
| 116 |
.container::before {
|
| 117 |
position: absolute;
|
| 118 |
top: -12px;
|
|
@@ -124,36 +122,18 @@ class GradioInterface:
|
|
| 124 |
font-size: 1.2em;
|
| 125 |
}
|
| 126 |
|
| 127 |
-
/* Remove
|
| 128 |
-
.gradio-container
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
border: none !important;
|
| 130 |
-
background: none !important;
|
| 131 |
-
}
|
| 132 |
-
|
| 133 |
-
/* Remove backgrounds and borders from inputs */
|
| 134 |
-
.no-background > div:first-child {
|
| 135 |
-
border: none !important;
|
| 136 |
-
background: transparent !important;
|
| 137 |
box-shadow: none !important;
|
|
|
|
| 138 |
}
|
| 139 |
|
| 140 |
-
/*
|
| 141 |
-
h1 {
|
| 142 |
-
color: #2196F3 !important;
|
| 143 |
-
font-size: 2.5em !important;
|
| 144 |
-
font-weight: bold !important;
|
| 145 |
-
margin-bottom: 0.5em !important;
|
| 146 |
-
text-align: center !important;
|
| 147 |
-
}
|
| 148 |
-
|
| 149 |
-
h3 {
|
| 150 |
-
color: #666 !important;
|
| 151 |
-
font-size: 1.2em !important;
|
| 152 |
-
text-align: center !important;
|
| 153 |
-
margin-bottom: 1em !important;
|
| 154 |
-
}
|
| 155 |
-
|
| 156 |
-
/* Container labels */
|
| 157 |
.title-container::before { content: ''; }
|
| 158 |
.input-container::before { content: 'PROMPT REFINEMENT'; }
|
| 159 |
.analysis-container::before { content: 'ANALYSIS & REFINEMENT'; }
|
|
@@ -161,80 +141,12 @@ class GradioInterface:
|
|
| 161 |
.results-container::before { content: 'RESULTS'; }
|
| 162 |
.examples-container::before { content: 'EXAMPLES'; }
|
| 163 |
|
| 164 |
-
/* Radio
|
| 165 |
.radio-group {
|
| 166 |
display: flex;
|
| 167 |
gap: 10px;
|
| 168 |
margin: 10px 0;
|
| 169 |
}
|
| 170 |
-
|
| 171 |
-
/* Remove default Gradio container styles */
|
| 172 |
-
.gradio-container {
|
| 173 |
-
border: none !important;
|
| 174 |
-
}
|
| 175 |
-
|
| 176 |
-
/* Remove input container borders */
|
| 177 |
-
.input-container div,
|
| 178 |
-
.input-container textarea,
|
| 179 |
-
.input-container input {
|
| 180 |
-
border: none !important;
|
| 181 |
-
box-shadow: none !important;
|
| 182 |
-
}
|
| 183 |
-
|
| 184 |
-
/* Remove textbox container borders */
|
| 185 |
-
.textbox-container {
|
| 186 |
-
border: none !important;
|
| 187 |
-
box-shadow: none !important;
|
| 188 |
-
}
|
| 189 |
-
|
| 190 |
-
/* Remove focus outlines */
|
| 191 |
-
*:focus {
|
| 192 |
-
outline: none !important;
|
| 193 |
-
box-shadow: none !important;
|
| 194 |
-
}
|
| 195 |
-
|
| 196 |
-
/* Remove nested container borders */
|
| 197 |
-
.container .gradio-container,
|
| 198 |
-
.container .gradio-container > div {
|
| 199 |
-
border: none !important;
|
| 200 |
-
box-shadow: none !important;
|
| 201 |
-
}
|
| 202 |
-
|
| 203 |
-
/* Target specific Gradio elements */
|
| 204 |
-
.gr-box,
|
| 205 |
-
.gr-form,
|
| 206 |
-
.gr-input,
|
| 207 |
-
.gr-panel {
|
| 208 |
-
border: none !important;
|
| 209 |
-
box-shadow: none !important;
|
| 210 |
-
}
|
| 211 |
-
|
| 212 |
-
/* Remove any remaining borders */
|
| 213 |
-
.container * {
|
| 214 |
-
border-color: transparent !important;
|
| 215 |
-
}
|
| 216 |
-
|
| 217 |
-
/* Markdown text styling */
|
| 218 |
-
.markdown {
|
| 219 |
-
font-size: 1em !important;
|
| 220 |
-
line-height: 1.6 !important;
|
| 221 |
-
color: #333 !important;
|
| 222 |
-
}
|
| 223 |
-
|
| 224 |
-
/* Button styling */
|
| 225 |
-
button {
|
| 226 |
-
background: #2196F3 !important;
|
| 227 |
-
color: white !important;
|
| 228 |
-
border: none !important;
|
| 229 |
-
border-radius: 5px !important;
|
| 230 |
-
padding: 10px 20px !important;
|
| 231 |
-
cursor: pointer !important;
|
| 232 |
-
transition: background 0.3s !important;
|
| 233 |
-
}
|
| 234 |
-
|
| 235 |
-
button:hover {
|
| 236 |
-
background: #1976D2 !important;
|
| 237 |
-
}
|
| 238 |
"""
|
| 239 |
|
| 240 |
with gr.Blocks(css=custom_css, theme=gr.themes.Default()) as self.interface:
|
|
|
|
| 102 |
def __init__(self, prompt_refiner: PromptRefiner):
|
| 103 |
self.prompt_refiner = prompt_refiner
|
| 104 |
custom_css = """
|
|
|
|
| 105 |
.container {
|
| 106 |
border: 2px solid #2196F3;
|
| 107 |
border-radius: 10px;
|
|
|
|
| 111 |
position: relative;
|
| 112 |
}
|
| 113 |
|
|
|
|
| 114 |
.container::before {
|
| 115 |
position: absolute;
|
| 116 |
top: -12px;
|
|
|
|
| 122 |
font-size: 1.2em;
|
| 123 |
}
|
| 124 |
|
| 125 |
+
/* Remove gray borders from inputs while keeping other styles */
|
| 126 |
+
.gradio-container .gr-input,
|
| 127 |
+
.gradio-container .gr-textbox,
|
| 128 |
+
.gradio-container .gr-text-input,
|
| 129 |
+
.gradio-container textarea,
|
| 130 |
+
.gradio-container select {
|
| 131 |
border: none !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
box-shadow: none !important;
|
| 133 |
+
background: transparent !important;
|
| 134 |
}
|
| 135 |
|
| 136 |
+
/* Keep the container labels */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
.title-container::before { content: ''; }
|
| 138 |
.input-container::before { content: 'PROMPT REFINEMENT'; }
|
| 139 |
.analysis-container::before { content: 'ANALYSIS & REFINEMENT'; }
|
|
|
|
| 141 |
.results-container::before { content: 'RESULTS'; }
|
| 142 |
.examples-container::before { content: 'EXAMPLES'; }
|
| 143 |
|
| 144 |
+
/* Radio group styling */
|
| 145 |
.radio-group {
|
| 146 |
display: flex;
|
| 147 |
gap: 10px;
|
| 148 |
margin: 10px 0;
|
| 149 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
"""
|
| 151 |
|
| 152 |
with gr.Blocks(css=custom_css, theme=gr.themes.Default()) as self.interface:
|