Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,23 +102,22 @@ def run_council(user_prompt, rounds):
|
|
| 102 |
yield history
|
| 103 |
|
| 104 |
|
| 105 |
-
# ---
|
| 106 |
-
|
| 107 |
-
primary_hue="indigo",
|
| 108 |
-
font=[gr.themes.GoogleFont("Inter"), "ui-sans-serif", "system-ui", "sans-serif"],
|
| 109 |
).set(
|
| 110 |
-
button_primary_background_fill="#4241A6",
|
| 111 |
button_primary_background_fill_hover="#2D2C73",
|
| 112 |
button_primary_text_color="white",
|
| 113 |
-
block_title_text_color="#FF5A4D",
|
| 114 |
block_label_text_color="#4241A6",
|
| 115 |
body_text_color="#1F2937",
|
| 116 |
-
color_accent_soft="#FFEBE8",
|
| 117 |
)
|
| 118 |
|
| 119 |
-
#
|
| 120 |
-
with gr.Blocks(
|
| 121 |
-
# Cleane, professionelle Header-Sektion ohne Emojis
|
| 122 |
gr.HTML("""
|
| 123 |
<div style="text-align: center; margin-bottom: 2rem;">
|
| 124 |
<h1 style="color: #FF5A4D; font-weight: 800; font-size: 2.5rem; margin-bottom: 0.5rem;">PromptPlenum42</h1>
|
|
@@ -143,18 +142,17 @@ with gr.Blocks(theme=valantic_theme) as demo:
|
|
| 143 |
start_btn = gr.Button("Sitzung starten", variant="primary", size="lg")
|
| 144 |
clear_btn = gr.ClearButton(components=[input_text], value="Protokoll leeren", size="lg")
|
| 145 |
|
|
|
|
| 146 |
chatbot = gr.Chatbot(
|
| 147 |
label="Sitzungsprotokoll",
|
| 148 |
-
height=650
|
| 149 |
-
show_copy_button=True # Fügt einen praktischen Kopier-Button für das Endergebnis hinzu
|
| 150 |
)
|
| 151 |
|
| 152 |
-
# Clear Button leert auch den Chatbot
|
| 153 |
clear_btn.add(chatbot)
|
| 154 |
|
| 155 |
-
# Enter-Taste im Textfeld startet die Diskussion ebenfalls
|
| 156 |
input_text.submit(run_council, inputs=[input_text, rounds_slider], outputs=[chatbot])
|
| 157 |
start_btn.click(run_council, inputs=[input_text, rounds_slider], outputs=[chatbot])
|
| 158 |
|
| 159 |
if __name__ == "__main__":
|
| 160 |
-
|
|
|
|
|
|
| 102 |
yield history
|
| 103 |
|
| 104 |
|
| 105 |
+
# --- V BRANDING THEME ---
|
| 106 |
+
v_theme = gr.themes.Soft(
|
| 107 |
+
primary_hue="indigo",
|
| 108 |
+
font=[gr.themes.GoogleFont("Inter"), "ui-sans-serif", "system-ui", "sans-serif"],
|
| 109 |
).set(
|
| 110 |
+
button_primary_background_fill="#4241A6",
|
| 111 |
button_primary_background_fill_hover="#2D2C73",
|
| 112 |
button_primary_text_color="white",
|
| 113 |
+
block_title_text_color="#FF5A4D",
|
| 114 |
block_label_text_color="#4241A6",
|
| 115 |
body_text_color="#1F2937",
|
| 116 |
+
color_accent_soft="#FFEBE8",
|
| 117 |
)
|
| 118 |
|
| 119 |
+
# FIX 1: Theme hier rausgenommen!
|
| 120 |
+
with gr.Blocks() as demo:
|
|
|
|
| 121 |
gr.HTML("""
|
| 122 |
<div style="text-align: center; margin-bottom: 2rem;">
|
| 123 |
<h1 style="color: #FF5A4D; font-weight: 800; font-size: 2.5rem; margin-bottom: 0.5rem;">PromptPlenum42</h1>
|
|
|
|
| 142 |
start_btn = gr.Button("Sitzung starten", variant="primary", size="lg")
|
| 143 |
clear_btn = gr.ClearButton(components=[input_text], value="Protokoll leeren", size="lg")
|
| 144 |
|
| 145 |
+
# FIX 2: show_copy_button entfernt (Gradio 6 macht das nativ)
|
| 146 |
chatbot = gr.Chatbot(
|
| 147 |
label="Sitzungsprotokoll",
|
| 148 |
+
height=650
|
|
|
|
| 149 |
)
|
| 150 |
|
|
|
|
| 151 |
clear_btn.add(chatbot)
|
| 152 |
|
|
|
|
| 153 |
input_text.submit(run_council, inputs=[input_text, rounds_slider], outputs=[chatbot])
|
| 154 |
start_btn.click(run_council, inputs=[input_text, rounds_slider], outputs=[chatbot])
|
| 155 |
|
| 156 |
if __name__ == "__main__":
|
| 157 |
+
# FIX 1: Theme stattdessen hier unten eingefügt!
|
| 158 |
+
demo.launch(theme=v_theme)
|