Spaces:
Runtime error
Runtime error
clear plot area after first plot
Browse files
app.py
CHANGED
@@ -133,7 +133,6 @@ labelencoderOffice.classes_ = np.load("classes_office.npy")
|
|
133 |
|
134 |
|
135 |
def textclassification(SubmittedText):
|
136 |
-
plt.clf()
|
137 |
language = detect(SubmittedText)
|
138 |
|
139 |
# Translate the input to german if necessary
|
@@ -150,6 +149,7 @@ def textclassification(SubmittedText):
|
|
150 |
labelsOffice = labelencoderOffice.classes_
|
151 |
|
152 |
for pipe, barnames in zip((pipeDep, pipeOffice), (labelsDep, labelsOffice)):
|
|
|
153 |
prediction = pipe(SubmittedText[0:1000], return_all_scores=True)
|
154 |
rates = [row["score"] for row in prediction[0]]
|
155 |
|
|
|
133 |
|
134 |
|
135 |
def textclassification(SubmittedText):
|
|
|
136 |
language = detect(SubmittedText)
|
137 |
|
138 |
# Translate the input to german if necessary
|
|
|
149 |
labelsOffice = labelencoderOffice.classes_
|
150 |
|
151 |
for pipe, barnames in zip((pipeDep, pipeOffice), (labelsDep, labelsOffice)):
|
152 |
+
plt.clf()
|
153 |
prediction = pipe(SubmittedText[0:1000], return_all_scores=True)
|
154 |
rates = [row["score"] for row in prediction[0]]
|
155 |
|