Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
| 33 |
custom_css = """
|
| 34 |
-
/* Hintergrund
|
| 35 |
.gradio-container {
|
| 36 |
-
background-color: #
|
| 37 |
}
|
| 38 |
|
| 39 |
-
/*
|
| 40 |
-
|
| 41 |
-
|
| 42 |
|
| 43 |
-
/* Chat-Fenster
|
| 44 |
.chatbot {
|
| 45 |
-
border-radius:
|
| 46 |
-
border:
|
| 47 |
background-color: #ffffff !important;
|
|
|
|
| 48 |
}
|
| 49 |
|
| 50 |
-
/* Textfarbe (
|
| 51 |
.chatbot p, .chatbot span {
|
| 52 |
color: #111827 !important;
|
| 53 |
}
|
| 54 |
|
| 55 |
-
/* Eingabefeld (
|
| 56 |
#input-box textarea {
|
| 57 |
-
border-radius:
|
| 58 |
border: 2px solid #3b82f6 !important;
|
| 59 |
-
|
|
|
|
| 60 |
}
|
| 61 |
|
| 62 |
-
/*
|
| 63 |
button.primary {
|
| 64 |
-
border-radius:
|
| 65 |
background-color: #3b82f6 !important;
|
| 66 |
-
|
| 67 |
-
border: none !important;
|
| 68 |
}
|
| 69 |
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
| 71 |
"""
|
| 72 |
|
| 73 |
with gr.Blocks(title="CocoAi Smooth") as demo:
|
| 74 |
-
# Header
|
| 75 |
-
with gr.Column(
|
| 76 |
-
gr.HTML("<div style='text-align: center; padding:
|
| 77 |
-
gr.Markdown("# <span style='color: #1e40af;'>🐱 CocoAi</span>")
|
| 78 |
-
gr.Markdown("<p style='color: #
|
| 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="
|
| 98 |
-
radius_size="
|
| 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 |
)
|