Spaces:
Runtime error
Runtime error
fix code
Browse files
app.py
CHANGED
@@ -19,8 +19,6 @@ transformer_model = TFAutoModel.from_pretrained("xlm-roberta-base") #philschmid/
|
|
19 |
max_seq_length = 32
|
20 |
|
21 |
def create_model():
|
22 |
-
# input_layer = Input(shape=(input_ids.shape[1],))
|
23 |
-
# embedding_layer = Embedding(max_seq_length+ 1, 200, input_length=max_seq_length)(input_layer)
|
24 |
|
25 |
inputs = tf.keras.layers.Input(shape=(max_seq_length,), dtype=tf.int32)
|
26 |
embedding_layer = transformer_model(inputs)[0]
|
@@ -66,9 +64,9 @@ def create_model():
|
|
66 |
output_layer3 = Dense(1, activation='sigmoid', name='output3')(x3)
|
67 |
output_layer4 = Dense(1, activation='sigmoid', name='output4')(x4)
|
68 |
output_layer5 = Dense(1, activation='sigmoid', name='output5')(x5)
|
69 |
-
output_layer6 = Dense(
|
70 |
-
output_layer7 = Dense(
|
71 |
-
output_layer8 = Dense(
|
72 |
|
73 |
model = Model(inputs=inputs , outputs=[output_layer1, output_layer2, output_layer3,output_layer4,output_layer5,output_layer6,output_layer7,output_layer8])
|
74 |
model.load_weights("t1_m1.h5")
|
|
|
19 |
max_seq_length = 32
|
20 |
|
21 |
def create_model():
|
|
|
|
|
22 |
|
23 |
inputs = tf.keras.layers.Input(shape=(max_seq_length,), dtype=tf.int32)
|
24 |
embedding_layer = transformer_model(inputs)[0]
|
|
|
64 |
output_layer3 = Dense(1, activation='sigmoid', name='output3')(x3)
|
65 |
output_layer4 = Dense(1, activation='sigmoid', name='output4')(x4)
|
66 |
output_layer5 = Dense(1, activation='sigmoid', name='output5')(x5)
|
67 |
+
output_layer6 = Dense(119, activation='softmax', name='output6')(x6)
|
68 |
+
output_layer7 = Dense(25, activation='softmax', name='output7')(x7)
|
69 |
+
output_layer8 = Dense(61, activation='softmax', name='output8')(x8)
|
70 |
|
71 |
model = Model(inputs=inputs , outputs=[output_layer1, output_layer2, output_layer3,output_layer4,output_layer5,output_layer6,output_layer7,output_layer8])
|
72 |
model.load_weights("t1_m1.h5")
|