Chandranshu Jain
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
from langchain.tools import DuckDuckGoSearchRun
|
| 2 |
from crewai_tools import tool
|
|
|
|
| 3 |
@tool('DuckDuckGoSearch')
|
| 4 |
def search(search_query:str):
|
| 5 |
"""Search the web for the topic"""
|
|
@@ -72,4 +73,13 @@ crew = Crew(
|
|
| 72 |
process=Process.sequential # Optional: Sequential task execution is default
|
| 73 |
|
| 74 |
)
|
| 75 |
-
results=crew.kickoff()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from langchain.tools import DuckDuckGoSearchRun
|
| 2 |
from crewai_tools import tool
|
| 3 |
+
import streamlit as st
|
| 4 |
@tool('DuckDuckGoSearch')
|
| 5 |
def search(search_query:str):
|
| 6 |
"""Search the web for the topic"""
|
|
|
|
| 73 |
process=Process.sequential # Optional: Sequential task execution is default
|
| 74 |
|
| 75 |
)
|
| 76 |
+
#results=crew.kickoff()
|
| 77 |
+
|
| 78 |
+
#App making
|
| 79 |
+
# Streamlit app layout
|
| 80 |
+
st.title("AI Research Agent")
|
| 81 |
+
# Run Crew button
|
| 82 |
+
if st.button("Run"):
|
| 83 |
+
with st.spinner("Running the crew..."):
|
| 84 |
+
results=crew.kickoff()
|
| 85 |
+
st.success("Crew execution finished!")
|