Spaces:
Runtime error
Runtime error
File size: 3,372 Bytes
0128def 9fa668e 0128def 9f39c86 0128def 3ce50c4 e0cc0af e8d4494 e3d7fcc 44e601f 0128def 137679a ba56c74 00ef92a d9fa40f 137679a c9bef43 00ef92a c9bef43 00ef92a c9bef43 137679a ba56c74 d9fa40f aef7f47 d9fa40f 0a1e140 aef7f47 d9fa40f 0a1e140 aef7f47 d9fa40f 137679a ba56c74 d9fa40f f667ce5 00ef92a f667ce5 ba56c74 137679a ba56c74 0128def 63a4734 9fa668e |
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
---
title: Greet & Time
emoji: ⚡
colorFrom: pink
colorTo: yellow
sdk: gradio
sdk_version: 5.23.1
app_file: app.py
pinned: false
tags:
- smolagents
- agent
- smolagent
- tool
- agent-course
short_description: Personalized Greeting & Timezone Clock
---
## First Agent Template : Greet & Time
This application allows users to create personalized greeting messages and check the current local time in any global timezone.
An Agent from scratch using Python code has been created. Besides, to develop this Agent, smolagents has been used. In short, smolagents
is a library that focuses on codeAgent, a kind of agent that performs “Actions” through code blocks, and then “Observes” results by executing
the code. The agent inside smolagents is going to think, act and observe in cycle until it reaches a final answer. This Agent is capable of
performing actions such as time creating personalized greeting messages and zone checki h using Python code,
> 🧑🏫 This app is part of the **Hugging Face Courses** series and was developed as an educational project to showcase how machine learning
> can be used in real-world event scenarios.
> Learn more at [Hugging Face Courses](https://huggingface.co/learn).
---
### Repository Structure (🗂 Folder Structure)
```
gradio_greet_time_app/
│
├── app.py # Main launcher script that initializes and runs the Gradio app.
├── agent.json # JSON config for defining tools used by the agent.
├── Gradio_UI.py # Contains the Gradio Blocks interface layout and connects UI to the tools.
├── screenshot.jpeg # Sample preview for the use of the app (used in README)
├── prompt_config.yaml # Prompt configurations for examples
├── .env.template # Environment variables template /Template file showing expected environment variables (e.g., API keys).
├── requirements.txt # Python dependencies / List of Python dependencies to install
└── README.md # Project overview, setup instructions, usage examples, and screenshot link.
```
### Features
_The Tools_
- Greeting Generator: Enter a name or phrase and choose how many times you'd like the greeting to be repeated. The app will generate a
cheerful message like "Hello, HuggingFace!" multiple times.
- Timezone Clock: Input a valid timezone (e.g., Europe/London, America/New_York), and the app will show the current local time
for that region.
_The Agent_
It uses gpt-4o as the LLM engine. This is a very capable model that we’ll access via the serverless API.
_The System Prompt_
The agent’s system prompt is stored in a separate prompts.yaml file. This file contains predefined instructions that guide the agent’s
behavior. Storing prompts in a YAML file allows for easy customization and reuse across different agents or use cases.
---
### Preview
Examples of prompts for the use of the app can be found on [First Agent Template](Screenshot_15-5-2025_154725_huggingface.co.jpeg)
---
## 🤝 Contributing
We welcome contributions to improve GalaGuide!
1. Fork the repository
2. Create a new branch:
```bash
git checkout -b feature-xyz
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference |