Kode analisis sentimen ini:
"import pickle
import pandas as pd
import numpy as np
from keras.preprocessing.text import Tokenizer
from keras.utils import pad_sequences
from keras.models import Sequential
from keras.layers import Embedding, LSTM, Dense, Dropout, Conv1D, MaxPooling1D
from keras.layers import Flatten
from keras.utils import to_categorical
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score, classification_report
# Tambahkan import berikut
from transformers import AutoTokenizer, AutoModel

# Import libraries yang diperlukan
import numpy as np
from keras.models import Sequential
from keras.layers import Input, Embedding, Conv1D, MaxPooling1D, LSTM, Dense, Dropout
from keras.optimizers import Adam
from keras.callbacks import EarlyStopping
from keras.regularizers import l2
from sklearn.model_selection import StratifiedKFold
from sklearn.metrics import accuracy_score, classification_report
from transformers import BertTokenizer, TFBertModel
import tensorflow as tf

# Parameter untuk regularisasi L2
l2_coeff = 0.01

# Membaca dataset
data_list = pickle.load(open('pre_processed_berita_121_joined_FIX_parpolheuristic_added.pkl', 'rb'))
data = pd.DataFrame(data_list, columns=['judul', 'isi', 'pre_processed', 'Label', 'Partai_Politik_Heuristic'])
data['Isi Berita'] = data['pre_processed']

# Tokenisasi dan Padding
max_len =  500     # mengurangi panjang input
tokenizer = AutoTokenizer.from_pretrained("indobenchmark/indobert-large-p1")
sequences = tokenizer(list(data['Isi Berita']), padding='max_length', truncation=True, max_length=max_len, return_tensors="np")
X = sequences['input_ids']
y = to_categorical(data['Label'].astype('category').cat.codes)

# Inisialisasi StratifiedKFold
n_splits = 5
skf = StratifiedKFold(n_splits=n_splits, shuffle=True, random_state=42)

# Konversi kategori target ke nilai numerik
y_categorical = data['Label'].astype('category').cat.codes

# Menyimpan akurasi, report, dan history untuk setiap fold
accuracies = []
class_reports = []
histories = []

# Load tokenizer dari IndoBERT
tokenizer = BertTokenizer.from_pretrained("indolem/indobert-base-uncased")

# Fungsi helper untuk meng-encode teks
def encode_sentence(sentence):
    encode = tokenizer.encode_plus(
        sentence,
        max_length=500,
        padding="max_length",
        truncation=True,
        return_attention_mask=True,
        return_token_type_ids=False,
        return_tensors="tf",
    )
    return encode["input_ids"], encode["attention_mask"]

# Encode teks dari dataset
sentences = data["Isi Berita"]
sentences_encoded = [encode_sentence(sentence) for sentence in sentences]
X = np.array([np.asarray(encoded) for encoded in sentences_encoded], dtype=object)

iter_num = 1
for train_index, test_index in skf.split(X, y_categorical):
    print("\nTraining and evaluating model for fold", iter_num)

    # Membagi data berdasarkan indeks dari fold saat ini
    X_train, X_test = X[train_index], X[test_index]
    y_train, y_test = y[train_index], y[test_index]

    # Ambil model IndoBERT yang sudah dilakukan fine-tuning
    indobert_layer = TFBertModel.from_pretrained("indolem/indobert-base-uncased")

    # Input dan attention mask dari IndoBERT
    input_ids = Input(shape=(500,), dtype=tf.int32)
    attention_mask = Input(shape=(500,), dtype=tf.int32)

    # Embedding dari model IndoBERT
    embedding = indobert_layer(input_ids, attention_mask=attention_mask)[0]

    # Membangun model untuk fold saat ini
    x = Conv1D(256, 3, activation='relu', kernel_regularizer=l2(0.01))(embedding)
    x = MaxPooling1D(pool_size=4)(x)
    x = LSTM(200, return_sequences=False, kernel_regularizer=l2(0.01), recurrent_regularizer=l2(0.01))(x)
    x = Dense(32, activation='relu', kernel_regularizer=l2(0.01))(x)
    x = Dropout(0.5)(x)
    output = Dense(3, activation='softmax')(x)

    model = tf.keras.Model(inputs=[input_ids, attention_mask], outputs=output)

    # Buat callback early stopping
    callback_es = EarlyStopping(monitor='val_loss', patience=5, verbose=1,
                                restore_best_weights=True)

    # Menyusun Model
    optimizer = Adam(learning_rate=0.0001)
    model.compile(optimizer=optimizer, loss='categorical_crossentropy', metrics=['accuracy'])

    # Melatih Model
    history = model.fit(X_train, y_train, validation_data=(X_test, y_test), epochs=100, batch_size=128,
                        callbacks=[callback_es])
    histories.append(history)
    model.save('CNN-LSTM_IndoBERT_CNN256_LSTM200_' + str(iter_num) + '.h5')

    # Evaluasi model pada lipatan saat ini
    y_pred = model.predict(X_test)
    y_pred_labels = np.argmax(y_pred, axis=1)
    y_test_labels = np.argmax(y_test, axis=1)

    # Menghitung akurasi
    accuracy = accuracy_score(y_test_labels, y_pred_labels)
    print("Fold", iter_num, "Accuracy: {:.2f}%".format(accuracy * 100))

    # Classification report
    class_report = classification_report(y_test_labels, y_pred_labels)

    # Menambahkan akurasi dan report ke daftar
    accuracies.append(accuracy)
    class_reports.append(class_report)

    iter_num += 1

# Hitung rata-rata akurasi dan cetak report klasifikasi untuk setiap fold
average_accuracy = np.mean(accuracies)
print("\nAverage accuracy across folds: {:.2f}%".format(average_accuracy * 100))

for i, report in enumerate(class_reports):
    print("\nClassification report for fold", i + 1)
    print(report)"

menghasilkan error berikut, bagaimana solusinya?
"OSError                                   Traceback (most recent call last)
Cell In[10], line 9
      6 y_train, y_test = y[train_index], y[test_index]
      8 # Ambil model IndoBERT yang sudah dilakukan fine-tuning
----> 9 indobert_layer = TFBertModel.from_pretrained("indolem/indobert-base-uncased")
     11 # Input dan attention mask dari IndoBERT
     12 input_ids = Input(shape=(500,), dtype=tf.int32)

File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers\modeling_tf_utils.py:2677, in TFPreTrainedModel.from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)
   2671 has_file_kwargs = {
   2672     "revision": revision,
   2673     "proxies": proxies,
   2674     "use_auth_token": use_auth_token,
   2675 }
   2676 if has_file(pretrained_model_name_or_path, WEIGHTS_NAME, **has_file_kwargs):
-> 2677     raise EnvironmentError(
   2678         f"{pretrained_model_name_or_path} does not appear to have a file named"
   2679         f" {TF2_WEIGHTS_NAME} but there is a file for PyTorch weights. Use `from_pt=True` to"
   2680         " load this model from those weights."
   2681     )
   2682 else:
   2683     raise EnvironmentError(
   2684         f"{pretrained_model_name_or_path} does not appear to have a file named {WEIGHTS_NAME},"
   2685         f" {TF2_WEIGHTS_NAME} or {TF_WEIGHTS_NAME}"
   2686     )

OSError: indolem/indobert-base-uncased does not appear to have a file named tf_model.h5 but there is a file for PyTorch weights. Use `from_pt=True` to load this model from those weights."