Spaces:
Sleeping
Sleeping
import streamlit as st | |
import requests | |
from agents.voice_agent import speech_to_text, text_to_speech | |
st.title("🧠 Morning Market Brief - Finance Assistant") | |
option = st.radio("Input Mode", ["Voice", "Click Button"]) | |
if option == "Voice": | |
query = speech_to_text() | |
st.write(f"You said: {query}") | |
else: | |
if st.button("Get Morning Brief"): | |
query = "What's our risk exposure in Asia tech stocks today?" | |
if query: | |
response = requests.get("http://localhost:8000/market-brief").json() | |
st.success(response['brief']) | |
text_to_speech(response['brief']) | |