Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from main import setup_agents_and_tasks, kickoff_crew
|
3 |
+
|
4 |
+
def main():
|
5 |
+
st.title("AI LOVES HR Sales Agent Interface")
|
6 |
+
|
7 |
+
# Input form
|
8 |
+
with st.form(key='agent_input_form'):
|
9 |
+
lead_name = st.text_input("Lead Name", value="DeepLearningAI")
|
10 |
+
industry = st.text_input("Industry", value="Online Learning Platform")
|
11 |
+
key_decision_maker = st.text_input("Key Decision Maker", value="Andrew Ng")
|
12 |
+
position = st.text_input("Position", value="CEO")
|
13 |
+
milestone = st.text_input("Recent Milestone", value="product launch")
|
14 |
+
|
15 |
+
submit_button = st.form_submit_button(label='Submit')
|
16 |
+
|
17 |
+
if submit_button:
|
18 |
+
inputs = {
|
19 |
+
"lead_name": lead_name,
|
20 |
+
"industry": industry,
|
21 |
+
"key_decision_maker": key_decision_maker,
|
22 |
+
"position": position,
|
23 |
+
"milestone": milestone
|
24 |
+
}
|
25 |
+
|
26 |
+
# Setup agents and tasks
|
27 |
+
crew = setup_agents_and_tasks()
|
28 |
+
|
29 |
+
# Kickoff the crew with the provided inputs
|
30 |
+
result = kickoff_crew(crew, inputs)
|
31 |
+
st.write(result)
|
32 |
+
|
33 |
+
if __name__ == "__main__":
|
34 |
+
main()
|