baconnier commited on
Commit
74b54dc
1 Parent(s): c605a37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +60 -66
app.py CHANGED
@@ -102,72 +102,66 @@ 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;
108
- padding: 10px; /* Reduced from 20px */
109
- margin: 10px; /* Reduced from 15px */
110
- background: white;
111
- position: relative;
112
- }
113
-
114
- .container::before {
115
- position: absolute;
116
- top: -10px; /* Reduced from -12px */
117
- left: 10px;
118
- background: white;
119
- padding: 0 10px;
120
- color: #2196F3;
121
- font-weight: bold;
122
- font-size: 1.2em;
123
- }
124
-
125
- /* Remove default Gradio styles */
126
- .no-background > div:first-child {
127
- border: none !important;
128
- background: transparent !important;
129
- box-shadow: none !important;
130
- }
131
-
132
- /* Reduce spacing between elements */
133
- .gradio-container {
134
- gap: 0.5rem !important; /* Reduced spacing between components */
135
- }
136
-
137
- /* Reduce margins for markdown elements */
138
- .markdown {
139
- margin: 0.3em 0 !important; /* Reduced top/bottom margins */
140
- }
141
-
142
- /* Container labels */
143
- .title-container::before { content: 'PROMPT++'; }
144
- .input-container::before { content: 'PROMPT REFINEMENT'; }
145
- .analysis-container::before { content: 'ANALYSIS & REFINEMENT'; }
146
- .model-container::before { content: 'MODEL APPLICATION'; }
147
- .results-container::before { content: 'RESULTS'; }
148
- .examples-container::before { content: 'EXAMPLES'; }
149
-
150
- /* Radio group styling with reduced spacing */
151
- .radio-group {
152
- display: flex;
153
- gap: 5px; /* Reduced from 10px */
154
- margin: 5px 0; /* Reduced from 10px */
155
- }
156
-
157
- /* Reduce spacing in columns */
158
- .gr-form > div {
159
- gap: 0.5rem !important;
160
- }
161
-
162
- /* Reduce padding in textboxes */
163
- .gr-textbox {
164
- padding: 0.3rem !important;
165
- }
166
-
167
- /* Reduce accordion spacing */
168
- .gr-accordion {
169
- margin: 0.3rem 0 !important;
170
- }
171
  """
172
 
173
  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;
108
+ padding: 10px;
109
+ margin: 10px;
110
+ background: white;
111
+ position: relative;
112
+ }
113
+
114
+ .container::before {
115
+ position: absolute;
116
+ top: -10px;
117
+ left: 10px;
118
+ background: white;
119
+ padding: 0 10px;
120
+ color: #2196F3;
121
+ font-weight: bold;
122
+ font-size: 1.2em;
123
+ }
124
+
125
+ .no-background > div:first-child {
126
+ border: none !important;
127
+ background: transparent !important;
128
+ box-shadow: none !important;
129
+ }
130
+
131
+ .gradio-container {
132
+ gap: 0.5rem !important;
133
+ }
134
+
135
+ .markdown {
136
+ margin: 0.3em 0 !important;
137
+ }
138
+
139
+ .title-container::before { content: 'PROMPT++'; }
140
+ .input-container::before { content: 'PROMPT REFINEMENT'; }
141
+ .analysis-container::before { content: 'ANALYSIS & REFINEMENT'; }
142
+ .model-container::before { content: 'MODEL APPLICATION'; }
143
+ .results-container::before { content: 'RESULTS'; }
144
+ .examples-container::before { content: 'EXAMPLES'; }
145
+
146
+ .radio-group {
147
+ display: flex;
148
+ gap: 5px;
149
+ margin: 5px 0;
150
+ }
151
+
152
+ .gr-form > div {
153
+ gap: 0.5rem !important;
154
+ }
155
+
156
+ .gr-textbox {
157
+ padding: 0.3rem !important;
158
+ border: 2px solid #4CAF50 !important;
159
+ border-radius: 5px !important;
160
+ }
161
+
162
+ .gr-accordion {
163
+ margin: 0.3rem 0 !important;
164
+ }
 
 
 
 
 
 
165
  """
166
 
167
  with gr.Blocks(css=custom_css, theme=gr.themes.Default()) as self.interface: