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