ajaykumar0712 commited on
Commit
eb0c61d
·
verified ·
1 Parent(s): 2b8315c

More bug fixes

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +17 -12
src/streamlit_app.py CHANGED
@@ -42,7 +42,7 @@ with left:
42
  strategist_output = ""
43
  chaos_output = ""
44
  compere_output = ""
45
- agent_outputs = ""
46
 
47
  teamA = None
48
  teamB = None
@@ -107,18 +107,23 @@ with left:
107
  else:
108
  raise e
109
 
110
- stats_output = agent_outputs["stats"]
111
- strategist_output = agent_outputs["strategist"]
112
- chaos_output = agent_outputs["chaos"]
113
- compere_output = agent_outputs["compere"]
114
-
115
- if agent_outputs:
116
- stats_output = agent_outputs["stats"]
117
- strategist_output = agent_outputs["strategist"]
118
- chaos_output = agent_outputs["chaos"]
119
- compere_output = agent_outputs["compere"]
 
 
 
 
 
 
120
  else:
121
- st.warning("No output generated. Please refine your query.")
122
  stats_output = ""
123
  strategist_output = ""
124
  chaos_output = ""
 
42
  strategist_output = ""
43
  chaos_output = ""
44
  compere_output = ""
45
+ agent_outputs = None
46
 
47
  teamA = None
48
  teamB = None
 
107
  else:
108
  raise e
109
 
110
+ # stats_output = agent_outputs["stats"]
111
+ # strategist_output = agent_outputs["strategist"]
112
+ # chaos_output = agent_outputs["chaos"]
113
+ # compere_output = agent_outputs["compere"]
114
+
115
+ if isinstance(agent_outputs, dict):
116
+ stats_output = agent_outputs.get("stats", "")
117
+ strategist_output = agent_outputs.get("strategist", "")
118
+ chaos_output = agent_outputs.get("chaos", "")
119
+ compere_output = agent_outputs.get("compere", "")
120
+ elif isinstance(agent_outputs, str):
121
+ # fallback if agents return raw string
122
+ stats_output = ""
123
+ strategist_output = ""
124
+ chaos_output = ""
125
+ compere_output = agent_outputs
126
  else:
 
127
  stats_output = ""
128
  strategist_output = ""
129
  chaos_output = ""