Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ def app(input, filter_strategy, relevence_threshold, k, length_management_strate
|
|
10 |
length_limit = classifier_pipeline.tokenizer.model_max_length
|
11 |
kwargs = {'padding':True,'truncation':True,'max_length':length_limit}
|
12 |
|
13 |
-
kwargs['top_k'] =
|
14 |
|
15 |
if length_management_strategy=='solo_inizio':
|
16 |
res = classifier_pipeline(input, **kwargs)
|
|
|
10 |
length_limit = classifier_pipeline.tokenizer.model_max_length
|
11 |
kwargs = {'padding':True,'truncation':True,'max_length':length_limit}
|
12 |
|
13 |
+
kwargs['top_k'] = classifier_pipeline.model.num_labels
|
14 |
|
15 |
if length_management_strategy=='solo_inizio':
|
16 |
res = classifier_pipeline(input, **kwargs)
|