Spaces:
Runtime error
Runtime error
File size: 677 Bytes
a85a69f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
"""Application File"""
import os
from smolagents import GradioUI, CodeAgent, InferenceClientModel
from retriever import load_guest_dataset
OPENAI_API_KEY = os.environ["OPENAI_API_KEY"]
BASE_URL = os.environ["BASE_URL"]
model = InferenceClientModel(api_key=OPENAI_API_KEY, base_url=BASE_URL)
# Load the guest dataset and initialize the guest info tool
guest_info_tool = load_guest_dataset()
# Create Alfred with all the tools
alfred = CodeAgent(
tools=[guest_info_tool],
model=model,
add_base_tools=True, # Add any additional base tools
planning_interval=3, # Enable planning every 3 steps
)
if __name__ == "__main__":
GradioUI(alfred).launch()
|