Spaces:
Sleeping
Sleeping
Download user_data.py from vioott/BookMatchAI-Python-GeminiAPI: direct link, hf CLI and curl.
- Browser
- Download file 354 Bytes
-
https://huggingface.co/spaces/vioott/BookMatchAI-Python-GeminiAPI/resolve/8161c551e9daf9c6b92dceb953e7e9096dcda57d/user_data.py
- Command line
-
hf download hf://spaces/vioott/BookMatchAI-Python-GeminiAPI@8161c551e9daf9c6b92dceb953e7e9096dcda57d/user_data.py
-
curl -L -o user_data.py https://huggingface.co/spaces/vioott/BookMatchAI-Python-GeminiAPI/resolve/8161c551e9daf9c6b92dceb953e7e9096dcda57d/user_data.py
354 Bytes
| def get_user_history(user_id: int) -> dict: | |
| """ | |
| Retorna o histórico de compras do usuário. | |
| """ | |
| user_histories = { | |
| 1: {'fiction': 5, 'non_fiction': 2, 'science': 0}, | |
| 2: {'fiction': 1, 'non_fiction': 4, 'science': 1}, | |
| 3: {'fiction': 0, 'non_fiction': 1, 'science': 5}, | |
| } | |
| return user_histories.get(user_id) | |