wensjheng commited on
Commit
c3d0665
·
verified ·
1 Parent(s): 81e12ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +39 -0
app.py CHANGED
@@ -5,6 +5,45 @@ import json
5
  GEMINI_API_KEY = "AIzaSyAZ3WSpx_o53zpmhIJRzR0JMsiBOTnttbg"
6
  API_URL = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key={GEMINI_API_KEY}"
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  INTRO_TEXT = """
9
  <div style='border:3px solid #2e8baf; border-radius:20px; padding:25px; background-color:#e6f3f9;'>
10
  <div style='background-color:#ffffff; border-radius:12px; padding:15px;'>
 
5
  GEMINI_API_KEY = "AIzaSyAZ3WSpx_o53zpmhIJRzR0JMsiBOTnttbg"
6
  API_URL = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key={GEMINI_API_KEY}"
7
 
8
+ custom_css = """
9
+ body, .gradio-container {
10
+ background-color: #d3eaf7 !important;
11
+ color: #1c5179 !important;
12
+ }
13
+
14
+ .gr-button, button {
15
+ background-color: #1c5179 !important;
16
+ color: white !important;
17
+ font-weight: bold;
18
+ border-radius: 12px !important;
19
+ }
20
+
21
+ .gr-chatbot, .gr-chatbot * {
22
+ background-color: #f0faff !important;
23
+ color: #1c5179 !important;
24
+ }
25
+
26
+ textarea, .gr-textbox, .gr-input, input, select {
27
+ background-color: #ffffff !important;
28
+ color: #1c5179 !important;
29
+ border: 1px solid #a6cfe2 !important;
30
+ }
31
+
32
+ /* 修正 placeholder 淡字也要可見 */
33
+ textarea::placeholder, input::placeholder {
34
+ color: #88aabb !important;
35
+ }
36
+
37
+ /* 標籤與段落統一顏色 */
38
+ label, .gr-label, .block-title, .svelte-1ipelgc {
39
+ color: #1c5179 !important;
40
+ }
41
+
42
+ .gr-markdown h1, h2, h3, h4, h5, h6, p {
43
+ color: #1c5179 !important;
44
+ }
45
+ """
46
+
47
  INTRO_TEXT = """
48
  <div style='border:3px solid #2e8baf; border-radius:20px; padding:25px; background-color:#e6f3f9;'>
49
  <div style='background-color:#ffffff; border-radius:12px; padding:15px;'>