CoCoGames commited on
Commit
5c2da2d
·
verified ·
1 Parent(s): 0aea0f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -26
app.py CHANGED
@@ -29,53 +29,57 @@ def chat_fn(message, history):
29
  except Exception as e:
30
  yield f"Verbindung: {str(e)}"
31
 
32
- # 2. Das Premium-Design (Weiß / Blau / Fast-Schwarz)
33
  custom_css = """
34
- /* Hintergrund komplett Weiß */
35
  .gradio-container {
36
- background-color: #ffffff !important;
37
  }
38
 
39
- /* Entfernt den hässlichen Balken/Padding oben */
40
- .main { padding-top: 0px !important; }
41
- header { display: none !important; }
42
 
43
- /* Chat-Fenster Design */
44
  .chatbot {
45
- border-radius: 30px !important;
46
- border: 1px solid #e5e7eb !important;
47
  background-color: #ffffff !important;
 
48
  }
49
 
50
- /* Textfarbe (Fast Schwarz) */
51
  .chatbot p, .chatbot span {
52
  color: #111827 !important;
53
  }
54
 
55
- /* Eingabefeld (Rund & Sauber) */
56
  #input-box textarea {
57
- border-radius: 30px !important;
58
  border: 2px solid #3b82f6 !important;
59
- color: #111827 !important;
 
60
  }
61
 
62
- /* Buttons extrem Rund */
63
  button.primary {
64
- border-radius: 30px !important;
65
  background-color: #3b82f6 !important;
66
- color: white !important;
67
- border: none !important;
68
  }
69
 
70
- footer { display: none !important; }
 
 
 
71
  """
72
 
73
  with gr.Blocks(title="CocoAi Smooth") as demo:
74
- # Header Bereich
75
- with gr.Column(elem_id="title-area"):
76
- gr.HTML("<div style='text-align: center; padding: 20px;'>")
77
- gr.Markdown("# <span style='color: #1e40af;'>🐱 CocoAi</span>")
78
- gr.Markdown("<p style='color: #374151;'>Intelligent • Loyal • CocoEntertainment</p>")
79
  gr.HTML("</div>")
80
 
81
  # Interface
@@ -94,8 +98,7 @@ if __name__ == "__main__":
94
  css=custom_css,
95
  theme=gr.themes.Soft(
96
  primary_hue="blue",
97
- neutral_hue="slate",
98
- radius_size="lg",
99
- font=["Inter", "sans-serif"]
100
  )
101
  )
 
29
  except Exception as e:
30
  yield f"Verbindung: {str(e)}"
31
 
32
+ # 2. Das "Extra Round & Cloud Blue" Design
33
  custom_css = """
34
+ /* Hintergrund: Extrem helles, frisches Blau */
35
  .gradio-container {
36
+ background-color: #f0f7ff !important;
37
  }
38
 
39
+ /* Den Standard-Header von Hugging Face ausblenden */
40
+ footer { display: none !important; }
41
+ .main { padding-top: 20px !important; }
42
 
43
+ /* Chat-Fenster: Extrem rund und weiß */
44
  .chatbot {
45
+ border-radius: 40px !important;
46
+ border: none !important;
47
  background-color: #ffffff !important;
48
+ box-shadow: 0 10px 25px rgba(0,0,0,0.03) !important;
49
  }
50
 
51
+ /* Textfarbe (Sehr dunkles Grau/Schwarz) */
52
  .chatbot p, .chatbot span {
53
  color: #111827 !important;
54
  }
55
 
56
+ /* Eingabefeld: "Pillen"-Form (maximal rund) */
57
  #input-box textarea {
58
+ border-radius: 40px !important;
59
  border: 2px solid #3b82f6 !important;
60
+ padding: 15px 25px !important;
61
+ background-color: #ffffff !important;
62
  }
63
 
64
+ /* Senden-Knopf: Ebenfalls maximal rund */
65
  button.primary {
66
+ border-radius: 40px !important;
67
  background-color: #3b82f6 !important;
68
+ padding: 10px 25px !important;
 
69
  }
70
 
71
+ /* Buttons allgemein abrunden */
72
+ .gr-button {
73
+ border-radius: 40px !important;
74
+ }
75
  """
76
 
77
  with gr.Blocks(title="CocoAi Smooth") as demo:
78
+ # Header
79
+ with gr.Column():
80
+ gr.HTML("<div style='text-align: center; padding: 10px;'>")
81
+ gr.Markdown("# <span style='color: #1e40af; font-size: 32px;'>🐱 CocoAi</span>")
82
+ gr.Markdown("<p style='color: #4b5563; font-weight: 500;'>Intelligent • Loyal • CocoEntertainment</p>")
83
  gr.HTML("</div>")
84
 
85
  # Interface
 
98
  css=custom_css,
99
  theme=gr.themes.Soft(
100
  primary_hue="blue",
101
+ neutral_hue="blue",
102
+ radius_size="xxl", # Maximale Abrundung für das Theme
 
103
  )
104
  )