DawnC commited on
Commit
34f44fd
1 Parent(s): 2b82929

Update app.py

Browse files

revised CSS part

Files changed (1) hide show
  1. app.py +60 -24
app.py CHANGED
@@ -180,30 +180,66 @@ iface = gr.Interface(
180
  'Saint_Bernard.jpeg',
181
  'French_Bulldog.jpeg',
182
  'Samoyed.jpg'],
183
- css="""
184
- .output-markdown {
185
- font-family: Noto Sans, sans-serif;
186
- line-height: 1.6;
187
- }
188
- .gr-button {
189
- background-color: #3498DB;
190
- color: white;
191
- border-radius: 8px;
192
- box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
193
- padding: 10px 20px;
194
- }
195
- .gr-button:hover {
196
- background-color: #2980B9;
197
- }
198
- .gr-box {
199
- background: linear-gradient(to bottom, #f2f4f5, #ffffff);
200
- border-radius: 10px;
201
- padding: 20px;
202
- box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
203
- }
204
- """,
205
- theme="default"
206
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
 
208
 
209
  # Launch the app
 
180
  'Saint_Bernard.jpeg',
181
  'French_Bulldog.jpeg',
182
  'Samoyed.jpg'],
183
+ css = """
184
+ /* 美化按鈕樣式 */
185
+ .gr-button {
186
+ background-color: #1ABC9C;
187
+ color: white;
188
+ border-radius: 12px;
189
+ box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.15);
190
+ padding: 12px 24px;
191
+ transition: background-color 0.3s ease, transform 0.2s ease;
192
+ font-weight: bold;
193
+ }
194
+ .gr-button:hover {
195
+ background-color: #16A085;
196
+ transform: scale(1.05);
197
+ }
198
+
199
+ /* 美化標題 */
200
+ h1, h2, h3, h4, h5 {
201
+ font-family: 'Roboto', sans-serif;
202
+ text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
203
+ color: #2C3E50;
204
+ font-weight: bold;
205
+ }
206
+
207
+ /* 設定背景漸層 */
208
+ body {
209
+ background: linear-gradient(to bottom right, #ECF0F1, #FFFFFF);
210
+ }
211
+
212
+ /* 美化圖片上傳區塊 */
213
+ .gr-box {
214
+ background: #F9F9F9;
215
+ border: 2px solid #BDC3C7;
216
+ border-radius: 15px;
217
+ padding: 20px;
218
+ box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
219
+ transition: box-shadow 0.3s ease;
220
+ }
221
+ .gr-box:hover {
222
+ box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.2);
223
+ }
224
+
225
+ /* 修改 markdown 區塊字體及行高 */
226
+ .output-markdown {
227
+ font-family: 'Noto Sans', sans-serif;
228
+ line-height: 1.75;
229
+ color: #34495E;
230
+ }
231
+
232
+ /* 調整範例圖片區塊樣式 */
233
+ .examples img {
234
+ border-radius: 10px;
235
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
236
+ }
237
+ .examples img:hover {
238
+ transform: scale(1.05);
239
+ box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.15);
240
+ }
241
+ """
242
+
243
 
244
 
245
  # Launch the app