Instructions to use FredZhang7/google-safesearch-mini-tfjs with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TF-Keras
How to use FredZhang7/google-safesearch-mini-tfjs with TF-Keras:
# Note: 'keras<3.x' or 'tf_keras' must be installed (legacy) # See https://github.com/keras-team/tf-keras for more details. from huggingface_hub import from_pretrained_keras model = from_pretrained_keras("FredZhang7/google-safesearch-mini-tfjs") - Notebooks
- Google Colab
- Kaggle
Commit ·
6fcab6a
1
Parent(s): 25e5000
Upload model
Browse files
Model.py
CHANGED
|
@@ -113,5 +113,5 @@ class InceptionV3ModelForImageClassification(PreTrainedModel):
|
|
| 113 |
out, aux = self(image)
|
| 114 |
if print_tensor:
|
| 115 |
print(out)
|
| 116 |
-
_, predicted = torch.max(out.
|
| 117 |
return self.config.classes[str(predicted.item())]
|
|
|
|
| 113 |
out, aux = self(image)
|
| 114 |
if print_tensor:
|
| 115 |
print(out)
|
| 116 |
+
_, predicted = torch.max(out.logits, 1)
|
| 117 |
return self.config.classes[str(predicted.item())]
|