79660177

Date: 2025-06-10 09:43:34
Score: 0.5
Natty:
Report link

This works:

import tensorflow.compat.v1 as tf # compatible only for multilingual USE, large USE, EN-DE USE, ...
#import tensorflow as tf # version 2 is compatible only for USE 4, ..
import tensorflow_hub as hub
import spacy
import logging
from scipy import spatial

logging.getLogger('tensorflow').disabled = True #OPTIONAL - to disable outputs from Tensorflow

# elmo = hub.Module('path if downloaded/Elmo_dowmloaded', trainable=False)
elmo = hub.load("https://tfhub.dev/google/elmo/3")

tensor_of_strings = tf.constant(["Gray",
                                 "Quick",
                                 "Lazy"])
elmo.signatures['default'](tensor_of_strings)
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Sarka