-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot generate "model id" from step4 #2
Comments
Have you set NANONETS_API_KEY as an env variable? |
yes using this command " !export NANONETS_API_KEY= my API key" @rushabhnagda11 |
This is the code inside my training.py file: import os API_KEY = os.environ.get('NANONETS_API_KEY') IMAGE_DIR = './images/' model = OCR(API_KEY, CATEGORIES) images = [IMAGE_DIR + x for x in os.listdir(IMAGE_DIR)] annotations = [ANNOTATION_DIR + x for x in os.listdir(ANNOTATION_DIR)] training_dict = dict(zip(images, annotations)) response = model.train(training_dict) print("NEXT RUN: export NANONETS_MODEL_ID=" + model.model_id) |
when I run the command : "python ./code/training.py" the "model_id" is not generated, and this error occurs:
Traceback (most recent call last):
File "./code/training.py", line 10, in
model = OCR(API_KEY, CATEGORIES)
File "/usr/local/lib/python3.6/dist-packages/nanonets/ocr.py", line 17, in init
self.create_model(categories)
File "/usr/local/lib/python3.6/dist-packages/nanonets/ocr.py", line 46, in create_model
self.model_id = response.json()["model_id"]
KeyError: 'model_id'
any solution how to fix this and thanks :)
The text was updated successfully, but these errors were encountered: