File size: 2,444 Bytes
c1a6db4
 
 
 
 
 
 
 
beeb8e5
c1a6db4
 
3128565
 
63551f1
 
 
 
 
ee0c846
 
 
 
 
63551f1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
title: What to Wear  Clothing Recommendation Agent
emoji: 🧥
colorFrom: indigo
colorTo: blue
sdk: streamlit
sdk_version: 1.44.1
app_file: app.py
pinned: false
---

![CD to HF Space](https://github.com/serverdaun/what_to_wear/actions/workflows/deploy_to_spaces.yml/badge.svg)

# What to Wear — Clothing Recommendation Agent

This application is a smart outfit recommendation assistant built with Streamlit and a code-based agent architecture. It provides personalized clothing suggestions based on real-time weather conditions in a user-specified city.

P.S. You don't have to look out the window anymore :)
 
## Live Demo
 
Try the application live on Hugging Face Spaces: [https://huggingface.co/spaces/serverdaun/what_to_wear](https://huggingface.co/spaces/serverdaun/what_to_wear)
 

## Features

- Fetches hourly weather forecast for the selected city
- Uses an LLM-based agent to reason over weather and user data
- Suggests three stylish outfits: top, bottom, shoes, accessories
- Interactive UI built with Streamlit

## Installation

1. Clone the repository:
   ```bash
   git clone https://github.com/yourusername/what_to_wear.git
   cd what_to_wear
   ```

2. Create and activate a virtual environment:
   ```bash
   python -m venv venv
   source venv/bin/activate  # Windows: venv\Scripts\activate
   ```

3. Install the dependencies:
   ```bash
   pip install -r requirements.txt
   ```

4. Add your Hugging Face token in a `.env` file:
   ```env
   HF_TOKEN=your_huggingface_api_token
   ```

## Running the App

To launch the app:

```bash
streamlit run app.py
```

Then open [http://localhost:8501](http://localhost:8501) in your browser.

## User Inputs

- **City** (e.g., Prague)
- **Age** (e.g., 25)
- **Gender** (Male / Female)

## Output Format

The app returns three outfit suggestions, each including:

- `style`: The overall theme of the outfit (e.g., Casual, Sporty, Business Casual)
- `top`: Shirt, t-shirt, or similar
- `bottom`: Pants, shorts, etc.
- `shoes`: Footwear
- `accessories`: A list of optional accessories (e.g., sunglasses, belts)

### Example output:
Below is a screenshot of the output in UI:

![Outfit Recommendation Screenshot](assets/example_output.png)

## Notes

- The app uses Open Meteo API via the `get_weather_forecast` tool to fetch 24-hour weather forecasts.
- Outfit ideas are generated by a Hugging Face-powered LLM agent, orchestrated by `smol-agents`.

## License

MIT License