Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,6 +102,11 @@ class GradioInterface:
|
|
| 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;
|
|
@@ -122,35 +127,36 @@ class GradioInterface:
|
|
| 122 |
font-size: 1.2em;
|
| 123 |
}
|
| 124 |
|
| 125 |
-
/* Fix
|
| 126 |
-
.gradio-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
.gradio-container .gr-text-input,
|
| 130 |
-
.gradio-container .gr-box {
|
| 131 |
-
border: 1px solid #ddd !important;
|
| 132 |
-
border-radius: 4px !important;
|
| 133 |
-
padding: 8px !important;
|
| 134 |
-
width: 100% !important;
|
| 135 |
-
margin: 0 !important;
|
| 136 |
-
box-sizing: border-box !important;
|
| 137 |
}
|
| 138 |
|
| 139 |
-
/*
|
| 140 |
-
.gradio-
|
| 141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
}
|
| 143 |
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
|
|
|
|
|
|
|
|
|
| 147 |
}
|
| 148 |
|
| 149 |
/* Container labels */
|
| 150 |
.title-container::before { content: ''; }
|
| 151 |
.input-container::before { content: 'PROMPT REFINEMENT'; }
|
| 152 |
.analysis-container::before { content: 'ANALYSIS & REFINEMENT'; }
|
| 153 |
-
.model-container::before { content: '
|
| 154 |
.results-container::before { content: 'RESULTS'; }
|
| 155 |
.examples-container::before { content: 'EXAMPLES'; }
|
| 156 |
|
|
@@ -161,14 +167,43 @@ class GradioInterface:
|
|
| 161 |
margin: 6px 0;
|
| 162 |
}
|
| 163 |
|
| 164 |
-
/*
|
| 165 |
-
.gradio-container
|
| 166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
}
|
| 168 |
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
}
|
| 173 |
"""
|
| 174 |
|
|
|
|
| 102 |
def __init__(self, prompt_refiner: PromptRefiner):
|
| 103 |
self.prompt_refiner = prompt_refiner
|
| 104 |
custom_css = """
|
| 105 |
+
/*
|
| 106 |
+
.gradio-container {
|
| 107 |
+
background-color: #e3f2fd !important;
|
| 108 |
+
}
|
| 109 |
+
*/
|
| 110 |
.container {
|
| 111 |
border: 2px solid #2196F3;
|
| 112 |
border-radius: 10px;
|
|
|
|
| 127 |
font-size: 1.2em;
|
| 128 |
}
|
| 129 |
|
| 130 |
+
/* Fix radio button visibility */
|
| 131 |
+
.gradio-radio {
|
| 132 |
+
display: flex !important;
|
| 133 |
+
gap: 8px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
}
|
| 135 |
|
| 136 |
+
/* Style for radio button labels */
|
| 137 |
+
.gradio-radio label {
|
| 138 |
+
display: flex !important;
|
| 139 |
+
align-items: center !important;
|
| 140 |
+
padding: 6px 12px !important;
|
| 141 |
+
border: 1px solid #ddd !important;
|
| 142 |
+
border-radius: 4px !important;
|
| 143 |
+
cursor: pointer !important;
|
| 144 |
+
background: white !important;
|
| 145 |
}
|
| 146 |
|
| 147 |
+
/* Style for selected radio button */
|
| 148 |
+
.gradio-radio input[type="radio"]:checked + label {
|
| 149 |
+
background: #e3f2fd !important;
|
| 150 |
+
border-color: #2196F3 !important;
|
| 151 |
+
color: #2196F3 !important;
|
| 152 |
+
font-weight: bold !important;
|
| 153 |
}
|
| 154 |
|
| 155 |
/* Container labels */
|
| 156 |
.title-container::before { content: ''; }
|
| 157 |
.input-container::before { content: 'PROMPT REFINEMENT'; }
|
| 158 |
.analysis-container::before { content: 'ANALYSIS & REFINEMENT'; }
|
| 159 |
+
.model-container::before { content: 'PROMPTS APPLICATION'; }
|
| 160 |
.results-container::before { content: 'RESULTS'; }
|
| 161 |
.examples-container::before { content: 'EXAMPLES'; }
|
| 162 |
|
|
|
|
| 167 |
margin: 6px 0;
|
| 168 |
}
|
| 169 |
|
| 170 |
+
/* Input styling */
|
| 171 |
+
.gradio-container input,
|
| 172 |
+
.gradio-container textarea,
|
| 173 |
+
.gradio-container select {
|
| 174 |
+
border: 1px solid #ddd !important;
|
| 175 |
+
background: white !important;
|
| 176 |
+
border-radius: 4px !important;
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
/* Make radio buttons more visible */
|
| 180 |
+
input[type="radio"] {
|
| 181 |
+
appearance: none !important;
|
| 182 |
+
-webkit-appearance: none !important;
|
| 183 |
+
width: 16px !important;
|
| 184 |
+
height: 16px !important;
|
| 185 |
+
border: 2px solid #ddd !important;
|
| 186 |
+
border-radius: 50% !important;
|
| 187 |
+
margin-right: 6px !important;
|
| 188 |
+
position: relative !important;
|
| 189 |
+
top: 2px !important;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
input[type="radio"]:checked {
|
| 193 |
+
border-color: #2196F3 !important;
|
| 194 |
+
background: #2196F3 !important;
|
| 195 |
}
|
| 196 |
|
| 197 |
+
input[type="radio"]:checked::after {
|
| 198 |
+
content: "" !important;
|
| 199 |
+
width: 8px !important;
|
| 200 |
+
height: 8px !important;
|
| 201 |
+
background: white !important;
|
| 202 |
+
border-radius: 50% !important;
|
| 203 |
+
position: absolute !important;
|
| 204 |
+
top: 50% !important;
|
| 205 |
+
left: 50% !important;
|
| 206 |
+
transform: translate(-50%, -50%) !important;
|
| 207 |
}
|
| 208 |
"""
|
| 209 |
|