CoolFace
Apppublic

Akshayram1/smol_agent

sourceHugging Faceupdated 2y agoView on Hugging Face
10likes
appaaa.py19 linesDownload Raw Back to root
1import streamlit as st2from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel3 4# Define the agent5agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=HfApiModel())6 7# Streamlit app title8st.title("SmolAgents Streamlit App")9 10# Input text box for user query11user_query = st.text_input("Enter your query:")12 13# Button to run the agent14if st.button("Run Agent"):15    if user_query:16        result = agent.run(user_query)17        st.write("Result:", result)18    else:19        st.write("Please enter a query.")