-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathstreamlit-agents.py
More file actions
21 lines (17 loc) · 656 Bytes
/
streamlit-agents.py
File metadata and controls
21 lines (17 loc) · 656 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import streamlit as st
from praisonaiagents import Agent, Tools
from praisonaiagents.tools import duckduckgo
st.title("AI Research Assistant")
st.write("Enter your research query below to get started!")
# Initialize the research agent
agent = Agent(instructions="You are a Research Agent", tools=[duckduckgo])
# Create the input field
query = st.text_input("Research Query", placeholder="Enter your research topic...")
# Add a search button
if st.button("Search"):
if query:
with st.spinner("Researching..."):
result = agent.start(query)
st.write(result)
else:
st.warning("Please enter a research query")