Spaces:
Running
Running
File size: 15,091 Bytes
4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c 4e9c5bd 965663c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 |
custom_css = """
/* ============================================
MAIN LAYOUT AND CONTAINERS
Purpose: Core layout structure with minimal spacing
============================================ */
/* Main container styling with blue border and rounded corners */
.container {
border: 2px solid #2196F3; /* Blue border with 2px thickness */
border-radius: 10px; /* Rounded corners */
padding: 10px !important; /* Inner spacing */
margin: 2px auto !important; /* Outer spacing and center alignment */
background: white; /* White background */
position: relative; /* For absolute positioning of children */
width: 100% !important; /* Full width */
max-width: 1200px !important; /* Maximum width constraint */
}
/* Section header label positioning and styling */
.container::before {
position: absolute; /* Position independently */
top: -18px; /* Negative top margin to overlap container border */
left: 20px; /* Left offset */
background: white; /* White background for text */
padding: 0 2px; /* Horizontal padding*/
color: #2196F3; /* Blue text color */
font-weight: bold; /* Bold text */
font-size: 1.2em; /* Larger text size */
}
/* ============================================
TITLE SECTION
Purpose: "Prompts on Chosen Model" header styling
============================================ */
/* Title container styling */
.title-container {
width: fit-content !important; /* Width based on content */
margin: 0 auto !important; /* Center alignment */
margin-bottom: 30px !important; /* Adjust the value (30px) as needed */
padding: 2px 40px !important; /* Horizontal padding */
border: 1px solid #0066cc !important; /* Blue border */
border-radius: 10px !important; /* Rounded corners */
background-color: rgba(0, 102, 204, 0.05) !important; /* Light blue background */
}
/* Center align all text in title container */
.title-container * {
text-align: center; /* Center text alignment */
margin: 0 !important; /* Remove margins */
line-height: 1.2 !important; /* Line height for readability */
}
/* Main title styling */
.title-container h1 {
font-size: 28px !important; /* Large font size */
margin-bottom: 1px !important; /* Small bottom margin */
}
/* Subtitle styling */
.title-container h3 {
font-size: 18px !important; /* Medium font size */
margin-bottom: 1px !important; /* Small bottom margin */
}
/* Paragraph text styling in title */
.title-container p {
font-size: 14px !important; /* Regular font size */
margin-bottom: 1px !important; /* Small bottom margin */
}
/* ============================================
SECTION LABELS
Purpose: Section header text content
============================================ */
/* Define text content for each section header */
.input-container::before { content: 'PROMPT ANALYSIS'; }
.analysis-container::before { content: 'PROMPT REFINEMENT'; }
.meta-container::before { content: 'REFINEMENT METHOD'; }
.model-container::before { content: 'PROMPTS APPLICATION'; }
.examples-container::before { content: 'EXAMPLES'; }
/* ============================================
INPUT ELEMENTS
Purpose: Textarea and input styling
============================================ */
/* Textarea styling */
.input-container textarea {
resize: vertical !important; /* Allow vertical resizing only */
min-height: 100px !important; /* Minimum height */
max-height: 500px !important; /* Maximum height */
width: 100% !important; /* Full width */
border: 1px solid #ddd !important; /* Light gray border */
border-radius: 4px !important; /* Rounded corners */
padding: 2px !important; /* Inner spacing */
transition: all 0.3s ease !important; /* Smooth transitions */
}
/* Textarea focus state */
.input-container textarea:focus {
border-color: #2196F3 !important; /* Blue border when focused */
box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1) !important; /* Subtle shadow */
}
/* ============================================
RADIO BUTTONS
Purpose: Selection options styling
============================================ */
/* Radio button group container */
.radio-group {
background-color: rgba(0, 102, 204, 0.05) !important; /* Light blue background */
padding: 10px !important; /* Inner spacing */
border-radius: 8px !important; /* Rounded corners */
border: 1px solid rgba(0, 102, 204, 0.1) !important; /* Light blue border */
display: flex !important; /* Flex layout */
justify-content: center !important; /* Center items */
flex-wrap: wrap !important; /* Allow wrapping */
gap: 8px !important; /* Space between items */
width: 100% !important; /* Full width */
}
/* Radio button container */
.gradio-radio {
display: flex !important; /* Flex layout */
justify-content: center !important; /* Center items */
flex-wrap: wrap !important; /* Allow wrapping */
gap: 8px !important; /* Space between items */
}
/* Radio button label styling */
.gradio-radio label {
display: flex !important; /* Flex layout */
align-items: center !important; /* Center vertically */
padding: 6px 12px !important; /* Inner spacing */
border: 1px solid #ddd !important; /* Light gray border */
border-radius: 4px !important; /* Rounded corners */
cursor: pointer !important; /* Pointer cursor */
background: white !important; /* White background */
margin: 4px !important; /* Outer spacing */
}
/* Selected radio button styling */
.gradio-radio input[type="radio"]:checked + label {
background: rgba(0, 102, 204, 0.1) !important; /* Light blue background */
border-color: #0066cc !important; /* Blue border */
color: #0066cc !important; /* Blue text */
font-weight: bold !important; /* Bold text */
}
/* ============================================
BUTTONS
Purpose: Interactive button styling
============================================ */
/* Base button styling */
.gradio-button {
background-color: white !important; /* White background */
color: #2196F3 !important; /* Blue text */
border: 2px solid #2196F3 !important; /* Blue border */
border-radius: 4px !important; /* Rounded corners */
padding: 8px 16px !important; /* Inner spacing */
margin: 10px 0 !important; /* Vertical margin */
font-weight: bold !important; /* Bold text */
transition: all 0.3s ease !important; /* Smooth transitions */
}
/* Button hover state */
.gradio-button:hover {
background-color: #2196F3 !important; /* Blue background on hover */
color: white !important; /* White text on hover */
box-shadow: 0 2px 5px rgba(33, 150, 243, 0.3) !important; /* Shadow effect */
}
/* Highlighted button state */
.button-highlight {
animation: pulse 2s infinite; /* Pulsing animation */
border-color: #ff9800 !important; /* Orange border */
border-width: 3px !important; /* Thicker border */
box-shadow: 0 0 10px rgba(255, 152, 0, 0.5) !important; /* Glow effect */
}
/* Pulsing animation keyframes */
@keyframes pulse {
0% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4); } /* Start state */
70% { box-shadow: 0 0 0 10px rgba(255, 152, 0, 0); } /* Mid state */
100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0); } /* End state */
}
/* Waiting button state */
.button-waiting {
opacity: 0.6 !important; /* Reduced opacity */
}
/* Completed button state */
.button-completed {
border-color: #4CAF50 !important; /* Green border */
background-color: rgba(76, 175, 80, 0.1) !important; /* Light green background */
}
/* ============================================
LAYOUT COMPONENTS
Purpose: Basic layout element styling
============================================ */
/* Accordion styling */
.gradio-accordion {
margin: 10px 0 !important; /* Vertical margin */
border: none !important; /* Remove border */
}
/* Main container layout */
.gradio-container {
display: flex !important; /* Flex layout */
flex-direction: column !important; /* Stack vertically */
align-items: center !important; /* Center items */
width: 100% !important; /* Full width */
max-width: 1200px !important; /* Maximum width */
margin: 2px auto !important; /* Center horizontally */
}
/* Dropdown menu styling */
.gradio-dropdown {
width: 100% !important; /* Full width */
max-width: 300px !important; /* Maximum width */
}
/* JSON response container */
.full-response-json {
margin-top: 20px !important; /* Top margin */
padding: 10px !important; /* Inner spacing */
background-color: rgba(0, 102, 204, 0.05) !important; /* Light blue background */
border-radius: 8px !important; /* Rounded corners */
}
/* ============================================
COMPARISON COLUMNS
Purpose: Side-by-side output display
============================================ */
/* Column container styling */
.comparison-column {
border: 2px solid #2196F3 !important; /* Blue border */
border-radius: 8px !important; /* Rounded corners */
padding: 4px !important; /* Inner spacing */
margin: 1px !important; /* Minimal margin */
background-color: white !important; /* White background */
flex: 1 !important; /* Equal width columns */
min-width: 300px !important; /* Minimum width */
padding-right: 2px !important; /* Add this to remove right padding */
margin-right: 2px !important; /* Add this to remove right margin */
}
/* Column header styling */
.comparison-column h3 {
color: #2196F3 !important; /* Blue text */
border-bottom: 1px solid #e0e0e0 !important; /* Bottom border */
padding-bottom: 2px !important; /* Bottom padding */
margin: 0 0 4px 0 !important; /* Bottom margin */
font-size: 16px !important; /* Font size */
text-align: center !important; /* Center text */
}
/* Output area styling */
.comparison-output {
min-height: 200px !important; /* Minimum height */
padding: 6px !important; /* Inner spacing */
background-color: #f8f9fa !important; /* Light gray background */
border: 1px solid #dee2e6 !important; /* Gray border */
border-radius: 4px !important; /* Rounded corners */
margin: 4px 0 !important; /* Vertical margin */
white-space: pre-wrap !important; /* Preserve whitespace */
word-wrap: break-word !important; /* Break long words */
font-family: monospace !important; /* Monospace font */
line-height: 1.5 !important; /* Line height */
overflow-y: auto !important; /* Vertical scroll */
width: 100% !important; /* Full width */
visibility: visible !important; /* Always visible */
opacity: 1 !important; /* Full opacity */
padding: 10px 3px !important; /* 20px top/bottom, 30px left/right */
}
/* ============================================
OUTPUT ROW
Purpose: Layout for output display
============================================ */
/* Output row container */
.output-row {
display: flex !important; /* Flex layout */
gap: 1mm !important; /* Small gap between items */
padding: 2mm !important; /* Inner spacing */
width: 100% !important; /* Full width */
flex-wrap: wrap !important; /* Allow wrapping */
}
/* ============================================
TABS
Purpose: Tab navigation styling
============================================ */
/* Tab container */
.tabs {
border: none !important; /* Remove border */
margin-top: 4px !important; /* Top margin */
width: 100% !important; /* Full width */
}
/* Individual tab item */
.tabitem {
padding: 4px !important; /* Inner spacing */
width: 100% !important; /* Full width */
}
/* ============================================
TEXT CONTENT
Purpose: Text display formatting
============================================ */
/* Markdown text styling */
.markdown-text {
color: #333333 !important; /* Dark gray text */
line-height: 1.6 !important; /* Line height */
font-size: 14px !important; /* Font size */
margin: 4px 4px !important; /* Vertical margin */
opacity: 1 !important; /* Full opacity */
visibility: visible !important; /* Always visible */
padding: 15px !important;
}
/* Placeholder text for empty output */
.comparison-output:empty::before {
content: 'Output will appear here' !important; /* Placeholder text */
color: #666666 !important; /* Gray text */
font-style: italic !important; /* Italic style */
}
/* ============================================
BUTTON STATES
Purpose: Button interaction styling
============================================ */
/* Default button state */
button {
opacity: 1 !important; /* Full opacity */
pointer-events: auto !important; /* Enable interactions */
}
/* Disabled button state */
button:disabled {
opacity: 0.6 !important; /* Reduced opacity */
pointer-events: none !important; /* Disable interactions */
}
/* ============================================
VISIBILITY
Purpose: Element display control
============================================ */
/* Output content visibility */
.output-content {
opacity: 1 !important; /* Full opacity */
visibility: visible !important; /* Always visible */
display: block !important; /* Block display */
}
/* Output container visibility */
.output-container {
display: block !important; /* Block display */
visibility: visible !important; /* Always visible */
opacity: 1 !important; /* Full opacity */
}
/* ============================================
CODE BLOCKS
Purpose: Code and pre-formatted text styling
============================================ */
/* Code block styling */
pre, code {
background-color: #f8f9fa !important; /* Light gray background */
border: 1px solid #dee2e6 !important; /* Gray border */
border-radius: 4px !important; /* Rounded corners */
padding: 10px !important; /* Inner spacing */
margin: 5px 0 !important; /* Vertical margin */
white-space: pre-wrap !important; /* Preserve whitespace */
word-wrap: break-word !important; /* Break long words */
font-family: monospace !important; /* Monospace font */
line-height: 1.5 !important; /* Line height */
display: block !important; /* Block display */
width: 100% !important; /* Full width */
}
""" |