Markus Clauss DIRU Vetsuisse
commited on
Commit
·
78a48c2
1
Parent(s):
8a37051
Fix avatar display and initial state issues
Browse files- Changed avatars from URLs to emoji for better compatibility
- Added proper initial roundtable state with all participants
- Fixed initial consensus display to show 0/10
- Ensured roundtable component receives valid JSON state on load
🤖 Generated with Claude Code
Co-Authored-By: Claude <[email protected]>
- __pycache__/app.cpython-311.pyc +0 -0
- app.py +20 -6
__pycache__/app.cpython-311.pyc
CHANGED
|
Binary files a/__pycache__/app.cpython-311.pyc and b/__pycache__/app.cpython-311.pyc differ
|
|
|
app.py
CHANGED
|
@@ -32,7 +32,7 @@ COUNCIL_MEMBERS = {
|
|
| 32 |
"dialect": "Baseldytsch",
|
| 33 |
"personality": "kultiviert, humorvoll, fasnachts-begeistert",
|
| 34 |
"speaking_style": "Verwendet typische Basler Ausdrücke wie 'Sali zämme', 'gäll', 'Bebbi', 'Fasnacht', 'Läckerli'",
|
| 35 |
-
"avatar": "
|
| 36 |
"system_prompt": """Du bist Ueli aus Basel und sprichst Baseldytsch.
|
| 37 |
Du bist kultiviert, humorvoll und liebst die Basler Fasnacht.
|
| 38 |
Verwende typische Basler Ausdrücke und Redewendungen.
|
|
@@ -43,7 +43,7 @@ Beispiele: 'Sali zämme', 'Das isch e gueti Sach, gäll', 'Mir Baasler wisse was
|
|
| 43 |
"dialect": "Bayrisch",
|
| 44 |
"personality": "gesellig, direkt, traditionsbewusst",
|
| 45 |
"speaking_style": "Verwendet bayrische Ausdrücke wie 'Servus', 'mei', 'a bisserl', 'g'scheid', 'Gaudi'",
|
| 46 |
-
"avatar": "
|
| 47 |
"system_prompt": """Du bist Sepp aus München und sprichst Bayrisch.
|
| 48 |
Du bist gesellig, direkt und traditionsbewusst.
|
| 49 |
Verwende typische bayrische Ausdrücke und Redewendungen.
|
|
@@ -54,7 +54,7 @@ Beispiele: 'Servus beinand', 'Des is fei a guade Idee', 'Mir miassn schaun dass
|
|
| 54 |
"dialect": "Schwäbisch",
|
| 55 |
"personality": "sparsam, fleißig, erfinderisch",
|
| 56 |
"speaking_style": "Verwendet schwäbische Ausdrücke wie 'Griaß Godd', 'hald', 'gell', 'schaffe', 'Spätzle'",
|
| 57 |
-
"avatar": "
|
| 58 |
"system_prompt": """Du bist Karl aus Stuttgart und sprichst Schwäbisch.
|
| 59 |
Du bist sparsam, fleißig und erfinderisch.
|
| 60 |
Verwende typische schwäbische Ausdrücke und Redewendungen.
|
|
@@ -66,7 +66,7 @@ Beispiele: 'Griaß Godd mitanand', 'Des isch hald so a Sach', 'Mir müsset schaf
|
|
| 66 |
MODERATOR = {
|
| 67 |
"name": "Dr. Müller (Moderator)",
|
| 68 |
"emoji": "🎓",
|
| 69 |
-
"avatar": "
|
| 70 |
"system_prompt": """Du bist Dr. Müller, ein neutraler Moderator für das Dialekt-Konsil.
|
| 71 |
Deine Aufgaben:
|
| 72 |
1. Fasse jede Diskussionsrunde zusammen
|
|
@@ -449,8 +449,22 @@ def create_interface():
|
|
| 449 |
# Roundtable visualization
|
| 450 |
with gr.Row():
|
| 451 |
with gr.Column(scale=1, elem_classes="roundtable-container"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 452 |
roundtable = consilium_roundtable(
|
| 453 |
-
value=
|
| 454 |
label="Diskussionsrunde",
|
| 455 |
min_width=600
|
| 456 |
)
|
|
@@ -458,7 +472,7 @@ def create_interface():
|
|
| 458 |
# Consensus score display
|
| 459 |
with gr.Row():
|
| 460 |
consensus_display = gr.Markdown(
|
| 461 |
-
value="**Konsensgrad:**
|
| 462 |
)
|
| 463 |
|
| 464 |
# Discussion history
|
|
|
|
| 32 |
"dialect": "Baseldytsch",
|
| 33 |
"personality": "kultiviert, humorvoll, fasnachts-begeistert",
|
| 34 |
"speaking_style": "Verwendet typische Basler Ausdrücke wie 'Sali zämme', 'gäll', 'Bebbi', 'Fasnacht', 'Läckerli'",
|
| 35 |
+
"avatar": "🇨🇭",
|
| 36 |
"system_prompt": """Du bist Ueli aus Basel und sprichst Baseldytsch.
|
| 37 |
Du bist kultiviert, humorvoll und liebst die Basler Fasnacht.
|
| 38 |
Verwende typische Basler Ausdrücke und Redewendungen.
|
|
|
|
| 43 |
"dialect": "Bayrisch",
|
| 44 |
"personality": "gesellig, direkt, traditionsbewusst",
|
| 45 |
"speaking_style": "Verwendet bayrische Ausdrücke wie 'Servus', 'mei', 'a bisserl', 'g'scheid', 'Gaudi'",
|
| 46 |
+
"avatar": "🥨",
|
| 47 |
"system_prompt": """Du bist Sepp aus München und sprichst Bayrisch.
|
| 48 |
Du bist gesellig, direkt und traditionsbewusst.
|
| 49 |
Verwende typische bayrische Ausdrücke und Redewendungen.
|
|
|
|
| 54 |
"dialect": "Schwäbisch",
|
| 55 |
"personality": "sparsam, fleißig, erfinderisch",
|
| 56 |
"speaking_style": "Verwendet schwäbische Ausdrücke wie 'Griaß Godd', 'hald', 'gell', 'schaffe', 'Spätzle'",
|
| 57 |
+
"avatar": "🏰",
|
| 58 |
"system_prompt": """Du bist Karl aus Stuttgart und sprichst Schwäbisch.
|
| 59 |
Du bist sparsam, fleißig und erfinderisch.
|
| 60 |
Verwende typische schwäbische Ausdrücke und Redewendungen.
|
|
|
|
| 66 |
MODERATOR = {
|
| 67 |
"name": "Dr. Müller (Moderator)",
|
| 68 |
"emoji": "🎓",
|
| 69 |
+
"avatar": "🎓",
|
| 70 |
"system_prompt": """Du bist Dr. Müller, ein neutraler Moderator für das Dialekt-Konsil.
|
| 71 |
Deine Aufgaben:
|
| 72 |
1. Fasse jede Diskussionsrunde zusammen
|
|
|
|
| 449 |
# Roundtable visualization
|
| 450 |
with gr.Row():
|
| 451 |
with gr.Column(scale=1, elem_classes="roundtable-container"):
|
| 452 |
+
# Create initial empty state
|
| 453 |
+
initial_roundtable_state = json.dumps({
|
| 454 |
+
"participants": [
|
| 455 |
+
{"name": "Ueli", "avatar": "🇨🇭", "message": "", "is_thinking": False, "is_current_speaker": False},
|
| 456 |
+
{"name": "Sepp", "avatar": "🥨", "message": "", "is_thinking": False, "is_current_speaker": False},
|
| 457 |
+
{"name": "Karl", "avatar": "🏰", "message": "", "is_thinking": False, "is_current_speaker": False},
|
| 458 |
+
{"name": "Moderator", "avatar": "🎓", "message": "", "is_thinking": False, "is_current_speaker": False}
|
| 459 |
+
],
|
| 460 |
+
"current_speaker": None,
|
| 461 |
+
"round": 0,
|
| 462 |
+
"topic": "",
|
| 463 |
+
"consensus_score": 0
|
| 464 |
+
})
|
| 465 |
+
|
| 466 |
roundtable = consilium_roundtable(
|
| 467 |
+
value=initial_roundtable_state,
|
| 468 |
label="Diskussionsrunde",
|
| 469 |
min_width=600
|
| 470 |
)
|
|
|
|
| 472 |
# Consensus score display
|
| 473 |
with gr.Row():
|
| 474 |
consensus_display = gr.Markdown(
|
| 475 |
+
value="**Konsensgrad:** 0/10 ⚪"
|
| 476 |
)
|
| 477 |
|
| 478 |
# Discussion history
|