Spaces:
Sleeping
Sleeping
Download services/content_service.py from clabs/learningview: direct link, hf CLI and curl.
- Browser
- Download file 967 Bytes
-
https://huggingface.co/spaces/clabs/learningview/resolve/main/services/content_service.py
- Command line
-
hf download hf://spaces/clabs/learningview/services/content_service.py
-
curl -L -o content_service.py https://huggingface.co/spaces/clabs/learningview/resolve/main/services/content_service.py
967 Bytes
| class ContentService: | |
| def get_prompt_by_level(self, level, region="AU_VIC"): | |
| # Calibration of text length for optimal 30-60 second biometric sample | |
| prompts = { | |
| "beginner": { | |
| "text": "The cat sat on the mat. The sun is hot. I like to run and play in the green grass.", | |
| "complexity": "Low" | |
| }, | |
| "intermediate": { | |
| "text": "The quick brown fox jumps over the lazy dog. Bright stars shine in the deep blue sky. Small birds sing sweet songs in the morning sun.", | |
| "complexity": "Medium" | |
| }, | |
| "advanced": { | |
| "text": "A shimmering silver moon rose over the silent mountains. The adventurous explorer discovered a hidden valley filled with ancient secrets.", | |
| "complexity": "High" | |
| } | |
| } | |
| return prompts.get(level.lower(), prompts["intermediate"]) | |
| content_service = ContentService() |