Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,35 +1,31 @@
|
|
| 1 |
-
from crewai import Crew,Process
|
| 2 |
-
from tasks import research_task,write_task
|
| 3 |
-
from agents import researcher,news_writer
|
| 4 |
-
import streamlit as st
|
| 5 |
-
## Forming the tech focused crew with some enhanced configuration
|
| 6 |
-
crew=Crew(
|
| 7 |
-
agents=[researcher,news_writer],
|
| 8 |
-
tasks=[research_task,write_task],
|
| 9 |
-
process=Process.sequential,
|
| 10 |
-
|
| 11 |
-
)
|
| 12 |
-
|
| 13 |
-
## starting the task execution process wiht enhanced feedback
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
st.title('Your Research Assistant')
|
| 17 |
-
with st.sidebar:
|
| 18 |
-
st.header('Enter Research Details')
|
| 19 |
-
topic = st.text_input("Main topic of your research:")
|
| 20 |
-
#detailed_questions = st.text_area("Specific questions or subtopics you are interested in exploring:")
|
| 21 |
-
|
| 22 |
-
if st.button('Run Research'):
|
| 23 |
-
if not topic :
|
| 24 |
-
st.error("Please fill all the fields.")
|
| 25 |
-
else:
|
| 26 |
-
#inputs = f"Research Topic: {topic}\nDetailed Questions: {detailed_questions}"
|
| 27 |
-
result=crew.kickoff(inputs={'topic':topic})
|
| 28 |
-
# result=crew.kickoff(inputs=inputs)
|
| 29 |
-
st.header("Results of your research project:")
|
| 30 |
-
st.markdown(result)
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
#F:/anaconda_installed/Scripts/activate
|
| 34 |
-
#conda activate C:\Users\parth\OneDrive\Desktop\llmProjects\YT_Agents\agentenvconda
|
| 35 |
-
|
|
|
|
| 1 |
+
from crewai import Crew,Process
|
| 2 |
+
from tasks import research_task,write_task
|
| 3 |
+
from agents import researcher,news_writer
|
| 4 |
+
import streamlit as st
|
| 5 |
+
## Forming the tech focused crew with some enhanced configuration
|
| 6 |
+
crew=Crew(
|
| 7 |
+
agents=[researcher,news_writer],
|
| 8 |
+
tasks=[research_task,write_task],
|
| 9 |
+
process=Process.sequential,
|
| 10 |
+
|
| 11 |
+
)
|
| 12 |
+
|
| 13 |
+
## starting the task execution process wiht enhanced feedback
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
st.title('Your Research Assistant')
|
| 17 |
+
with st.sidebar:
|
| 18 |
+
st.header('Enter Research Details')
|
| 19 |
+
topic = st.text_input("Main topic of your research:")
|
| 20 |
+
#detailed_questions = st.text_area("Specific questions or subtopics you are interested in exploring:")
|
| 21 |
+
|
| 22 |
+
if st.button('Run Research'):
|
| 23 |
+
if not topic :
|
| 24 |
+
st.error("Please fill all the fields.")
|
| 25 |
+
else:
|
| 26 |
+
#inputs = f"Research Topic: {topic}\nDetailed Questions: {detailed_questions}"
|
| 27 |
+
result=crew.kickoff(inputs={'topic':topic})
|
| 28 |
+
# result=crew.kickoff(inputs=inputs)
|
| 29 |
+
st.header("Results of your research project:")
|
| 30 |
+
st.markdown(result)
|
| 31 |
+
|
|
|
|
|
|
|
|
|
|
|
|