padmanabhbosamia commited on
Commit
908f93a
·
verified ·
1 Parent(s): 4b63e26

Cosmetic changes

Browse files
Files changed (1) hide show
  1. app.py +69 -11
app.py CHANGED
@@ -131,6 +131,62 @@ custom_css = """
131
  border-radius: 8px;
132
  margin: 10px 0;
133
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  """
135
 
136
  # Create the Gradio interface with enhanced UI
@@ -146,12 +202,13 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
146
 
147
  with gr.Row():
148
  with gr.Column(scale=2):
149
- prompt = gr.Textbox(
150
- label="Prompt",
151
- placeholder="Enter your prompt here...",
152
- lines=3,
153
- show_label=True,
154
- )
 
155
 
156
  with gr.Row():
157
  with gr.Column():
@@ -212,13 +269,14 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
212
  info="Toggle to show responses from both base and fine-tuned models"
213
  )
214
 
215
- generate_btn = gr.Button("Generate", variant="primary")
216
 
217
  with gr.Column(scale=3):
218
- output = gr.Markdown(
219
- label="Generated Response(s)",
220
- show_label=True,
221
- )
 
222
 
223
  gr.Markdown(
224
  """
 
131
  border-radius: 8px;
132
  margin: 10px 0;
133
  }
134
+ .prompt-box {
135
+ background-color: #ffffff;
136
+ border: 2px solid #3498db;
137
+ border-radius: 8px;
138
+ padding: 15px;
139
+ margin-bottom: 20px;
140
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
141
+ }
142
+ .prompt-box label {
143
+ font-size: 1.1em;
144
+ font-weight: bold;
145
+ color: #2c3e50;
146
+ margin-bottom: 10px;
147
+ display: block;
148
+ }
149
+ .prompt-box textarea {
150
+ width: 100%;
151
+ min-height: 100px;
152
+ padding: 10px;
153
+ border: 1px solid #bdc3c7;
154
+ border-radius: 4px;
155
+ font-size: 1em;
156
+ line-height: 1.5;
157
+ }
158
+ .output-box {
159
+ background-color: #ffffff;
160
+ border: 2px solid #2ecc71;
161
+ border-radius: 8px;
162
+ padding: 20px;
163
+ margin-top: 20px;
164
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
165
+ }
166
+ .output-box label {
167
+ font-size: 1.1em;
168
+ font-weight: bold;
169
+ color: #2c3e50;
170
+ margin-bottom: 15px;
171
+ display: block;
172
+ }
173
+ .output-box .markdown {
174
+ background-color: #f8f9fa;
175
+ padding: 15px;
176
+ border-radius: 6px;
177
+ border: 1px solid #e9ecef;
178
+ }
179
+ .output-box h3 {
180
+ color: #2c3e50;
181
+ border-bottom: 2px solid #3498db;
182
+ padding-bottom: 8px;
183
+ margin-top: 20px;
184
+ }
185
+ .output-box p {
186
+ line-height: 1.6;
187
+ color: #34495e;
188
+ margin: 10px 0;
189
+ }
190
  """
191
 
192
  # Create the Gradio interface with enhanced UI
 
202
 
203
  with gr.Row():
204
  with gr.Column(scale=2):
205
+ with gr.Column(elem_classes="prompt-box"):
206
+ prompt = gr.Textbox(
207
+ label="Enter Your Prompt Here",
208
+ placeholder="Type your prompt here... (e.g., 'What is machine learning?' or 'Write a story about a robot learning to paint')",
209
+ lines=5,
210
+ show_label=True,
211
+ )
212
 
213
  with gr.Row():
214
  with gr.Column():
 
269
  info="Toggle to show responses from both base and fine-tuned models"
270
  )
271
 
272
+ generate_btn = gr.Button("Generate", variant="primary", size="large")
273
 
274
  with gr.Column(scale=3):
275
+ with gr.Column(elem_classes="output-box"):
276
+ output = gr.Markdown(
277
+ label="Generated Response(s)",
278
+ show_label=True,
279
+ )
280
 
281
  gr.Markdown(
282
  """