Spaces:
Sleeping
Sleeping
Updated to include spinner and lag in agent debate
Browse files- src/streamlit_app.py +15 -10
src/streamlit_app.py
CHANGED
|
@@ -2,7 +2,7 @@ import streamlit as st
|
|
| 2 |
import pandas as pd
|
| 3 |
import plotly.graph_objects as go
|
| 4 |
import plotly.express as px
|
| 5 |
-
|
| 6 |
from agents import run_agents
|
| 7 |
from probability_engine import elo_probability
|
| 8 |
from data_loader import teams, team_map
|
|
@@ -95,6 +95,9 @@ with right:
|
|
| 95 |
|
| 96 |
st.subheader("Expert Debate Panel")
|
| 97 |
|
|
|
|
|
|
|
|
|
|
| 98 |
col1, col2 = st.columns(2)
|
| 99 |
col3, col4 = st.columns(2)
|
| 100 |
|
|
@@ -103,29 +106,31 @@ with right:
|
|
| 103 |
chaos_placeholder = col3.empty()
|
| 104 |
compere_placeholder = col4.empty()
|
| 105 |
|
| 106 |
-
# Statistician
|
| 107 |
with stat_placeholder.container():
|
|
|
|
|
|
|
| 108 |
st.markdown("### π Statistician")
|
| 109 |
st.write(stats_output)
|
| 110 |
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
# Strategist next
|
| 114 |
with strat_placeholder.container():
|
|
|
|
|
|
|
| 115 |
st.markdown("### π§ Strategist")
|
| 116 |
st.write(strategist_output)
|
| 117 |
|
| 118 |
-
time.sleep(3)
|
| 119 |
-
|
| 120 |
# Chaos agent
|
| 121 |
with chaos_placeholder.container():
|
|
|
|
|
|
|
| 122 |
st.markdown("### π² Chaos Agent")
|
| 123 |
st.write(chaos_output)
|
| 124 |
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
# Compere final summary
|
| 128 |
with compere_placeholder.container():
|
|
|
|
|
|
|
| 129 |
st.markdown("### π€ Compere")
|
| 130 |
st.write(compere_output)
|
| 131 |
|
|
|
|
| 2 |
import pandas as pd
|
| 3 |
import plotly.graph_objects as go
|
| 4 |
import plotly.express as px
|
| 5 |
+
import time
|
| 6 |
from agents import run_agents
|
| 7 |
from probability_engine import elo_probability
|
| 8 |
from data_loader import teams, team_map
|
|
|
|
| 95 |
|
| 96 |
st.subheader("Expert Debate Panel")
|
| 97 |
|
| 98 |
+
# explanation box
|
| 99 |
+
st.info("π§ Our AI expert panel debates the match before announcing the final prediction.")
|
| 100 |
+
|
| 101 |
col1, col2 = st.columns(2)
|
| 102 |
col3, col4 = st.columns(2)
|
| 103 |
|
|
|
|
| 106 |
chaos_placeholder = col3.empty()
|
| 107 |
compere_placeholder = col4.empty()
|
| 108 |
|
| 109 |
+
# Statistician
|
| 110 |
with stat_placeholder.container():
|
| 111 |
+
with st.spinner("Statistician analyzing numbers..."):
|
| 112 |
+
time.sleep(1.5)
|
| 113 |
st.markdown("### π Statistician")
|
| 114 |
st.write(stats_output)
|
| 115 |
|
| 116 |
+
# Strategist
|
|
|
|
|
|
|
| 117 |
with strat_placeholder.container():
|
| 118 |
+
with st.spinner("Strategist planning tactics..."):
|
| 119 |
+
time.sleep(1.5)
|
| 120 |
st.markdown("### π§ Strategist")
|
| 121 |
st.write(strategist_output)
|
| 122 |
|
|
|
|
|
|
|
| 123 |
# Chaos agent
|
| 124 |
with chaos_placeholder.container():
|
| 125 |
+
with st.spinner("Chaos agent considering unpredictable factors..."):
|
| 126 |
+
time.sleep(1.5)
|
| 127 |
st.markdown("### π² Chaos Agent")
|
| 128 |
st.write(chaos_output)
|
| 129 |
|
| 130 |
+
# Compere
|
|
|
|
|
|
|
| 131 |
with compere_placeholder.container():
|
| 132 |
+
with st.spinner("Compere summarizing the debate..."):
|
| 133 |
+
time.sleep(1.5)
|
| 134 |
st.markdown("### π€ Compere")
|
| 135 |
st.write(compere_output)
|
| 136 |
|