This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
import requests | |
from requests.auth import HTTPBasicAuth | |
# API Key stored as an env variable | |
PLANET_API_KEY = os.getenv('PL_API_KEY') # replace PL_API_KEY with Planet API key in quotes | |
item_type = "PSScene4Band" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
download_link = activation_status_result.json()["location"] | |
print(download_link) | |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def plot_image(i, predictions_array, true_label, img): | |
predictions_array, true_label, img = predictions_array[i], true_label[i], img[i] | |
plt.grid(False) | |
plt.xticks([]) | |
plt.yticks([]) | |
plt.imshow(img, cmap=plt.cm.binary) | |
predicted_label = np.argmax(predictions_array) | |
if predicted_label == true_label: |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config = """ | |
language: "en" | |
pipeline: | |
- name: "nlp_spacy" # loads the spacy language model | |
- name: "tokenizer_spacy" # splits the sentence into tokens | |
- name: "ner_crf" # uses the pretrained spacy NER model | |
- name: "intent_featurizer_spacy" # transform the sentence into a vector representation | |
- name: "intent_classifier_sklearn" # uses the vector representation to classify using SVM | |
- name: "ner_synonyms" # trains the synonyms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
domain_yml = """ | |
intents: | |
- greet | |
- goodbye | |
- mood_affirm | |
slots: | |
group: | |
type: text | |
entities: |