Spaces:
Build error
Build error
File size: 562 Bytes
6e28f48 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import tensorflow as tf
from config_utils import tf_gpu
tf_gpu()
tf.experimental.numpy.experimental_enable_numpy_behavior(prefer_float32=True)
from huggingface_hub import from_pretrained_keras
from datasets import load_dataset
data = load_dataset("jkwiatkowski/raven", split="val")
model = from_pretrained_keras("jkwiatkowski/raven")
def convert(data):
return {
'inputs': tf.cast(data['inputs'], dtype="uint8"),
'index': tf.cast(data['index'], dtype="uint8"),
'target': tf.cast(data['target'], dtype="int8"),
}
print("xD")
|