Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -25,6 +25,7 @@ max_seq_length = 128
|
|
25 |
dummy_label = 100
|
26 |
label_list = list(pd.read_excel('label_list.xlsx')['label_list'])
|
27 |
|
|
|
28 |
|
29 |
# Define a function to preprocess the new data
|
30 |
def get_feature_new(text, max_seq_length, tokenizer, dummy_label):
|
@@ -85,7 +86,7 @@ def launch(text_input):
|
|
85 |
# Decode labels using the label encoder
|
86 |
decoded_labels = label_encoder.inverse_transform(predicted_classes)
|
87 |
|
88 |
-
|
89 |
# Retrieve the ISCO description based on the decoded label
|
90 |
isco_description = map_data[map_data['ISCO 08 Code'] == decoded_labels[0]]['Title EN'].values
|
91 |
|
|
|
25 |
dummy_label = 100
|
26 |
label_list = list(pd.read_excel('label_list.xlsx')['label_list'])
|
27 |
|
28 |
+
map_data = pd.read_excel("ISCO-08 EN Structure and definitions.xlsx")
|
29 |
|
30 |
# Define a function to preprocess the new data
|
31 |
def get_feature_new(text, max_seq_length, tokenizer, dummy_label):
|
|
|
86 |
# Decode labels using the label encoder
|
87 |
decoded_labels = label_encoder.inverse_transform(predicted_classes)
|
88 |
|
89 |
+
|
90 |
# Retrieve the ISCO description based on the decoded label
|
91 |
isco_description = map_data[map_data['ISCO 08 Code'] == decoded_labels[0]]['Title EN'].values
|
92 |
|