Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -15,13 +15,12 @@ def ZeroShotTextClassification(text_input, candidate_labels):
|
|
15 |
Performs zero-shot classification on the given text input using the provided candidate labels.
|
16 |
|
17 |
Args:
|
18 |
-
|
19 |
-
|
20 |
|
21 |
Returns:
|
22 |
dict: A dictionary containing the predicted labels as keys and their corresponding scores as values.
|
23 |
"""
|
24 |
-
|
25 |
# Split the candidate labels
|
26 |
labels = [label.strip(" ") for label in candidate_labels.split(",")]
|
27 |
|
|
|
15 |
Performs zero-shot classification on the given text input using the provided candidate labels.
|
16 |
|
17 |
Args:
|
18 |
+
- text_input (str): The input text to classify.
|
19 |
+
- candidate_labels (str): A comma-separated string of candidate labels.
|
20 |
|
21 |
Returns:
|
22 |
dict: A dictionary containing the predicted labels as keys and their corresponding scores as values.
|
23 |
"""
|
|
|
24 |
# Split the candidate labels
|
25 |
labels = [label.strip(" ") for label in candidate_labels.split(",")]
|
26 |
|