Spaces:
Running
Running
github-actions[bot]
commited on
Commit
ยท
d98556a
1
Parent(s):
62cf4ef
Sync with https://github.com/mozilla-ai/surf-spot-finder
Browse files
utils.py
CHANGED
@@ -85,13 +85,13 @@ async def run_agent(user_inputs: dict[str, Any]):
|
|
85 |
# st.json(span.attributes, expanded=False)
|
86 |
if "input.value" in span.attributes:
|
87 |
input_value = json.loads(span.attributes["input.value"])
|
88 |
-
if isinstance(input_value, list):
|
89 |
st.write(f"Input: {input_value[-1]}")
|
90 |
else:
|
91 |
st.write(f"Input: {input_value}")
|
92 |
if "output.value" in span.attributes:
|
93 |
output_value = json.loads(span.attributes["output.value"])
|
94 |
-
if isinstance(output_value, list):
|
95 |
st.write(f"Output: {output_value[-1]}")
|
96 |
else:
|
97 |
st.write(f"Output: {output_value}")
|
|
|
85 |
# st.json(span.attributes, expanded=False)
|
86 |
if "input.value" in span.attributes:
|
87 |
input_value = json.loads(span.attributes["input.value"])
|
88 |
+
if isinstance(input_value, list) and len(input_value) > 0:
|
89 |
st.write(f"Input: {input_value[-1]}")
|
90 |
else:
|
91 |
st.write(f"Input: {input_value}")
|
92 |
if "output.value" in span.attributes:
|
93 |
output_value = json.loads(span.attributes["output.value"])
|
94 |
+
if isinstance(output_value, list) and len(output_value) > 0:
|
95 |
st.write(f"Output: {output_value[-1]}")
|
96 |
else:
|
97 |
st.write(f"Output: {output_value}")
|