Spaces:
Running
Running
Download src/game_setting.py from Agents-MCP-Hackathon/LLMGameHub: direct link, hf CLI and curl.
- Browser
- Download file 536 Bytes
-
https://huggingface.co/spaces/Agents-MCP-Hackathon/LLMGameHub/resolve/main/src/game_setting.py
- Command line
-
hf download hf://spaces/Agents-MCP-Hackathon/LLMGameHub/src/game_setting.py
-
curl -L -o game_setting.py https://huggingface.co/spaces/Agents-MCP-Hackathon/LLMGameHub/resolve/main/src/game_setting.py
536 Bytes
| from pydantic import BaseModel | |
| class Character(BaseModel): | |
| name: str | |
| age: str | |
| background: str | |
| personality: str | |
| class GameSetting(BaseModel): | |
| character: Character | |
| setting: str | |
| genre: str | |
| def get_user_story( | |
| scene_description: str, scene_image_description: str, user_choice: str | |
| ) -> str: | |
| return f"""Current scene description: | |
| {scene_description} | |
| Current scene image description: {scene_image_description} | |
| User's choice: {user_choice} | |
| """ | |