Spaces:
Sleeping
Sleeping
Download debug_test.py from meetmendapara/SPG_ML: direct link, hf CLI and curl.
- Browser
- Download file 893 Bytes
-
https://huggingface.co/spaces/meetmendapara/SPG_ML/resolve/main/debug_test.py
- Command line
-
hf download hf://spaces/meetmendapara/SPG_ML/debug_test.py
-
curl -L -o debug_test.py https://huggingface.co/spaces/meetmendapara/SPG_ML/resolve/main/debug_test.py
893 Bytes
| #!/usr/bin/env python | |
| """Debug test for task prediction""" | |
| import sys | |
| import io | |
| sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace') | |
| from main import TaskPredictionRequest, predict_task_completion | |
| print("="*60) | |
| print("Testing task prediction...") | |
| print("="*60) | |
| task = TaskPredictionRequest( | |
| title='Test Task', | |
| category='WORK', | |
| priority='MEDIUM', | |
| complexity=3, | |
| estimated_duration=60, | |
| due_date=None | |
| ) | |
| try: | |
| result = predict_task_completion(task) | |
| print('✓ SUCCESS') | |
| print(f'Keys: {list(result.keys())}') | |
| print(f'Completion probability: {result.get("completion_probability")}') | |
| print(f'Difficulty: {result.get("difficulty_level")}') | |
| print(f'Predicted duration: {result.get("predicted_duration")}') | |
| except Exception as e: | |
| print(f'✗ ERROR: {e}') | |
| import traceback | |
| traceback.print_exc() | |
| print("="*60) | |