Benjamin Consolvo
commited on
Commit
Β·
5faa415
1
Parent(s):
6c62682
add gift lfs tracking for images
Browse files- .gitattributes +1 -0
- README.md +28 -50
- images/hf_vacaigent.png +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
images/hf_vacaigent.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -7,17 +7,18 @@ sdk: streamlit
|
|
7 |
sdk_version: 1.44.1
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
-
license:
|
11 |
short_description: Let AI agents plan your next vacation!
|
12 |
---
|
13 |
|
14 |
# ποΈ VacAIgent: Streamlit-Integrated AI Crew for Trip Planning
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
|
|
|
|
19 |
|
20 |
-
VacAIgent leverages the CrewAI framework to automate and enhance the trip planning experience, integrating a user-friendly Streamlit interface. This project demonstrates how autonomous AI agents can collaborate and execute complex tasks efficiently, now with an added layer of interactivity and accessibility through Streamlit.
|
21 |
|
22 |
**Check out the video below for code walkthrough** π
|
23 |
|
@@ -29,28 +30,25 @@ VacAIgent leverages the CrewAI framework to automate and enhance the trip planni
|
|
29 |
|
30 |
## CrewAI Framework
|
31 |
|
32 |
-
CrewAI simplifies the orchestration of role-playing AI agents. In VacAIgent, these agents collaboratively decide on cities and craft a complete itinerary for your trip based on specified preferences, all accessible via a
|
33 |
-
|
34 |
-
## Streamlit Interface
|
35 |
|
36 |
-
The introduction of [Streamlit](https://streamlit.io/) transforms this application into an interactive web app, allowing users to easily input their preferences and receive tailored travel plans.
|
37 |
|
38 |
## Running the Application
|
39 |
|
40 |
To experience the VacAIgent app:
|
41 |
|
42 |
### Pre-Requisites
|
43 |
-
1.
|
44 |
-
2. Get the API
|
45 |
-
3.
|
|
|
46 |
|
47 |
### Deploy Trip Planner
|
48 |
|
49 |
#### Step 1
|
50 |
```sh
|
51 |
-
git clone https://github.com/
|
52 |
```
|
53 |
-
* *Please make sure git is installed*
|
54 |
|
55 |
#### Step 2
|
56 |
|
@@ -59,9 +57,10 @@ Insall Dependencies
|
|
59 |
pip install -r requirements.txt
|
60 |
```
|
61 |
#### Step 3
|
|
|
62 |
|
63 |
```sh
|
64 |
-
cd trip_planner_agent
|
65 |
```
|
66 |
|
67 |
create `.streamlit/secrets.toml` file and Update **Credentials**
|
@@ -71,52 +70,35 @@ create `.streamlit/secrets.toml` file and Update **Credentials**
|
|
71 |
SERPER_API_KEY=""
|
72 |
SCRAPINGANT_API_KEY=""
|
73 |
OPENAI_API_KEY=""
|
74 |
-
MODEL_ID=""
|
75 |
-
MODEL_BASE_URL=""
|
|
|
76 |
```
|
|
|
|
|
77 |
#### Step 4
|
78 |
|
79 |
Run the application
|
80 |
|
81 |
```sh
|
82 |
-
streamlit run
|
83 |
```
|
84 |
|
85 |
-
Your application should be up and running
|
86 |
|
87 |
-
β
**Disclaimer**: The application uses
|
88 |
|
89 |
## Details & Explanation
|
90 |
|
91 |
-
- **Streamlit UI**: The Streamlit interface is implemented in `streamlit_app.py`, where users can input their trip details.
|
92 |
- **Components**:
|
93 |
-
-
|
94 |
-
-
|
95 |
-
-
|
96 |
-
-
|
97 |
-
|
98 |
-
## Using GPT 3.5
|
99 |
-
|
100 |
-
To switch from GPT-4 to GPT-3.5, pass the llm argument in the agent constructor:
|
101 |
-
|
102 |
-
```python
|
103 |
-
from langchain.chat_models import ChatOpenAI
|
104 |
-
|
105 |
-
llm = ChatOpenAI(model='gpt-3.5-turbo') # Loading gpt-3.5-turbo (see more OpenAI models at https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4)
|
106 |
-
|
107 |
-
class TripAgents:
|
108 |
-
# ... existing methods
|
109 |
|
110 |
-
|
111 |
-
return Agent(
|
112 |
-
role='Local Expert',
|
113 |
-
goal='Provide insights about the selected city',
|
114 |
-
tools=[SearchTools.search_internet, BrowserTools.scrape_and_summarize_website],
|
115 |
-
llm=llm,
|
116 |
-
verbose=True
|
117 |
-
)
|
118 |
|
119 |
-
|
120 |
|
121 |
## Using Local Models with Ollama
|
122 |
|
@@ -157,8 +139,4 @@ class TripAgents:
|
|
157 |
|
158 |
## License
|
159 |
|
160 |
-
VacAIgent is open-sourced under the MIT
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
7 |
sdk_version: 1.44.1
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
+
license: mit
|
11 |
short_description: Let AI agents plan your next vacation!
|
12 |
---
|
13 |
|
14 |
# ποΈ VacAIgent: Streamlit-Integrated AI Crew for Trip Planning
|
15 |
|
16 |
+
VacAIgent leverages the CrewAI framework to automate and enhance the trip planning experience, integrating a user-friendly Streamlit interface. This project demonstrates how autonomous AI agents can collaborate and execute complex tasks efficiently.
|
17 |
|
18 |
+
_Forked and enhanced from the_ [_crewAI examples repository_](https://github.com/joaomdmoura/crewAI-examples/tree/main/trip_planner). You can find the application hosted on Hugging Face Spaces here:
|
19 |
+
|
20 |
+
[](https://huggingface.co/spaces/Intel/vacaigent)
|
21 |
|
|
|
22 |
|
23 |
**Check out the video below for code walkthrough** π
|
24 |
|
|
|
30 |
|
31 |
## CrewAI Framework
|
32 |
|
33 |
+
CrewAI simplifies the orchestration of role-playing AI agents. In VacAIgent, these agents collaboratively decide on cities and craft a complete itinerary for your trip based on specified preferences, all accessible via a Streamlit user interface.
|
|
|
|
|
34 |
|
|
|
35 |
|
36 |
## Running the Application
|
37 |
|
38 |
To experience the VacAIgent app:
|
39 |
|
40 |
### Pre-Requisites
|
41 |
+
1. Get the API key from **scrapinagent.com** from [scrapinagent](https://scrapingant.com/)
|
42 |
+
2. Get the API from **SERPER API** from [serper]( https://serper.dev/)
|
43 |
+
3. Bring your OpenAI compatible API key
|
44 |
+
4. Bring your model endpoint URL and LLM model ID that you want to use
|
45 |
|
46 |
### Deploy Trip Planner
|
47 |
|
48 |
#### Step 1
|
49 |
```sh
|
50 |
+
git clone https://github.com/opea-project/Enterprise-Inference/
|
51 |
```
|
|
|
52 |
|
53 |
#### Step 2
|
54 |
|
|
|
57 |
pip install -r requirements.txt
|
58 |
```
|
59 |
#### Step 3
|
60 |
+
Add Streamlit secrets
|
61 |
|
62 |
```sh
|
63 |
+
cd examples/trip_planner_agent
|
64 |
```
|
65 |
|
66 |
create `.streamlit/secrets.toml` file and Update **Credentials**
|
|
|
70 |
SERPER_API_KEY=""
|
71 |
SCRAPINGANT_API_KEY=""
|
72 |
OPENAI_API_KEY=""
|
73 |
+
MODEL_ID="meta-llama/Llama-3.3-70B-Instruct"
|
74 |
+
MODEL_BASE_URL="https://api.inference.denvrdata.com/v1/"
|
75 |
+
|
76 |
```
|
77 |
+
**Note**: You can alternatively add these secrets directly to Hugging Face Spaces Secrets, under the Settings tab, if deploying the Streamlit application directly on Hugging Face.
|
78 |
+
|
79 |
#### Step 4
|
80 |
|
81 |
Run the application
|
82 |
|
83 |
```sh
|
84 |
+
streamlit run app.py
|
85 |
```
|
86 |
|
87 |
+
Your application should be up and running in your web browser.
|
88 |
|
89 |
+
β
**Disclaimer**: The application uses meta-llama/Llama-3.3-70B-Instruct by default. Ensure you have access to an OpenAI-compatible API and be aware of any associated costs.
|
90 |
|
91 |
## Details & Explanation
|
92 |
|
|
|
93 |
- **Components**:
|
94 |
+
- [trip_tasks.py](trip_tasks.py): Contains task prompts for the agents.
|
95 |
+
- [trip_agents.py](trip_agents.py): Manages the creation of agents.
|
96 |
+
- [tools](tools) directory: Houses tool classes used by agents.
|
97 |
+
- [app.py](app.py): The heart of the frontend Streamlit app.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
+
## LLM Model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
+
To switch the LLM model being used, you can switch the `MODEL_ID` in the `.streamlit/secrets.toml` file.
|
102 |
|
103 |
## Using Local Models with Ollama
|
104 |
|
|
|
139 |
|
140 |
## License
|
141 |
|
142 |
+
VacAIgent is open-sourced under the MIT license.
|
|
|
|
|
|
|
|
images/hf_vacaigent.png
ADDED
![]() |
Git LFS Details
|