Spaces:
Runtime error
Runtime error
kaushikbar
commited on
Commit
·
7b69afb
1
Parent(s):
ba35254
separator back to commas
Browse files
app.py
CHANGED
@@ -144,7 +144,7 @@ def detect_lang(sequence, labels):
|
|
144 |
def sequence_to_classify(sequence, labels):
|
145 |
classifier = classifiers[detect_lang(sequence, labels)]
|
146 |
|
147 |
-
label_clean = str(labels).split("
|
148 |
response = classifier(sequence, label_clean, multi_label=True)
|
149 |
|
150 |
predicted_labels = response['labels']
|
@@ -165,8 +165,8 @@ iface = gr.Interface(
|
|
165 |
label="Please enter the text you would like to classify...",
|
166 |
placeholder="Text here..."),
|
167 |
gr.inputs.Textbox(lines=2,
|
168 |
-
label="Please enter the candidate labels (separated by
|
169 |
-
placeholder="Labels here separated by
|
170 |
outputs=gr.outputs.Label(num_top_classes=5),
|
171 |
#interpretation="default",
|
172 |
examples=prep_examples())
|
|
|
144 |
def sequence_to_classify(sequence, labels):
|
145 |
classifier = classifiers[detect_lang(sequence, labels)]
|
146 |
|
147 |
+
label_clean = str(labels).split(",")
|
148 |
response = classifier(sequence, label_clean, multi_label=True)
|
149 |
|
150 |
predicted_labels = response['labels']
|
|
|
165 |
label="Please enter the text you would like to classify...",
|
166 |
placeholder="Text here..."),
|
167 |
gr.inputs.Textbox(lines=2,
|
168 |
+
label="Please enter the candidate labels (separated by commas)...",
|
169 |
+
placeholder="Labels here separated by commas")],
|
170 |
outputs=gr.outputs.Label(num_top_classes=5),
|
171 |
#interpretation="default",
|
172 |
examples=prep_examples())
|