Spaces:
Running on Zero
Running on Zero
Download verify_local_model.py from leeennn009/LABEQ: direct link, hf CLI and curl.
- Browser
- Download file 678 Bytes
-
https://huggingface.co/spaces/leeennn009/LABEQ/resolve/main/verify_local_model.py
- Command line
-
hf download hf://spaces/leeennn009/LABEQ/verify_local_model.py
-
curl -L -o verify_local_model.py https://huggingface.co/spaces/leeennn009/LABEQ/resolve/main/verify_local_model.py
678 Bytes
| import json, urllib.request | |
| url='http://127.0.0.1:7862' | |
| try: | |
| with urllib.request.urlopen(url+'/health',timeout=10) as r: status=json.load(r) | |
| print('Health:',status) | |
| if not status.get('model_loaded') or not status.get('adapter_loaded'): | |
| raise RuntimeError('المودل أو LoRA غير محمل') | |
| print('✅ المودل المحلي يتجاوب، والأوزان تم تحميلها. اختبار التوليد التالي يتطلب ضغط زر لبِق.') | |
| except Exception as e: | |
| print('❌ فشل الوصول للخادم المحلي:',str(e)) | |
| print('تأكدي أن bash start_local_model.sh شغال في نافذة ثانية') | |
| raise SystemExit(1) | |