Download web_agent.py from piow/web_agent: direct link, hf CLI and curl.
- Browser
- Download file 931 Bytes
-
https://huggingface.co/spaces/piow/web_agent/resolve/main/web_agent.py
- Command line
-
hf download hf://spaces/piow/web_agent/web_agent.py
-
curl -L -o web_agent.py https://huggingface.co/spaces/piow/web_agent/resolve/main/web_agent.py
931 Bytes
| from agno.tools.duckduckgo import DuckDuckGoTools | |
| from agno.models.groq import Groq | |
| from huggingface_hub import configure_http_backend | |
| from getpass import getpass | |
| from agno.agent import Agent | |
| from agno.models.huggingface import HuggingFace | |
| import os | |
| import requests | |
| from dotenv import load_dotenv | |
| import streamlit as st | |
| load_dotenv() | |
| def backend_factory() -> requests.Session: | |
| session = requests.Session() | |
| session.verify = False | |
| return session | |
| configure_http_backend(backend_factory=backend_factory) | |
| os.environ['REQUESTS_CA_BUNDLE']='' | |
| agent = Agent( | |
| tools=[DuckDuckGoTools()], | |
| show_tool_calls=True, | |
| markdown=True, | |
| model=HuggingFace( | |
| id="meta-llama/Meta-Llama-3-8B-Instruct", | |
| max_tokens=4096, | |
| ), | |
| # model=Groq(id="llama-3.3-70b-versatile"), | |
| ) | |
| agent.print_response("i have devlopped a platform and i created an admin panel how to connect the admin panel to the platform") | |