rohanjain2312's picture
Update README.md
6136fd2 verified
|
Raw
History Blame Contribute Delete
1.61 kB

A newer version of the Gradio SDK is available: 6.20.0

Upgrade
metadata
title: FIRST AGENT
sdk: gradio
emoji: 
colorFrom: blue
colorTo: yellow
short_description: smolagents Code Agent with Agentic Tools

Overview - This Space is a Gradio app powered by Hugging Face smolagents. It exposes a code-executing agent (CodeAgent) with a small, explicit toolset and a chat UI. The agent plans in Thought → Code → Observation steps and must finish using the final_answer tool.

What’s included:

Gradio chat UI with step streaming and tool call visualization (Gradio_UI.py)

CodeAgent wired with prompt templates (prompts.yaml)

Tools:

final_answer: required to return the final result

image_generation_tool: text-to-image tool loaded from the Hub

get_current_time_in_timezone: returns current time in a given timezone (sentence/iso/json)

crypto_market_update: real‑time crypto prices and 24h change (Binance with Coinbase fallback)

Quickstart (local)

Install pip install -r requirements.txt

Run python app.py

Open the URL shown (local and share link) and chat with the agent

Example prompts:

Generate an image of a cat drinking coffee

Use crypto_market_update(assets='BTC,ETH', vs_currency='USD')

What time is it in Asia/Dubai? Use get_current_time_in_timezone(timezone='Asia/Dubai', return_format='iso')

Notes

The agent can only call registered tools. Do not import disallowed libraries in code blocks; use the tools instead.

The UI renders images inline and streams tool execution logs.

To deploy updates, push changes to this Space or upload files via the Space UI.

Spaces config reference: https://huggingface.co/docs/hub/spaces-config-reference