Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -420,10 +420,9 @@ def predict(text):
|
|
420 |
input_a = np.asarray([window_input])
|
421 |
pred = Modell.predict(input_a, batch_size=None, verbose=0, steps=None)
|
422 |
#print(pred)
|
423 |
-
|
424 |
-
|
425 |
-
predicted_class =
|
426 |
-
#print(labels[predicted_class])
|
427 |
|
428 |
return labels[predicted_class]
|
429 |
input_text = gr.inputs.Textbox(label="Enter a sentence")
|
|
|
420 |
input_a = np.asarray([window_input])
|
421 |
pred = Modell.predict(input_a, batch_size=None, verbose=0, steps=None)
|
422 |
#print(pred)
|
423 |
+
predicted_class = np.argmax(pred)
|
424 |
+
predictions.append(predicted_class)
|
425 |
+
#predicted_class = Counter(predictions).most_common(1)[0][0]
|
|
|
426 |
|
427 |
return labels[predicted_class]
|
428 |
input_text = gr.inputs.Textbox(label="Enter a sentence")
|