Update app.py
Browse files
app.py
CHANGED
@@ -64,7 +64,7 @@ def predict_sdg(text):
|
|
64 |
cleaned_text = prep_text(text)
|
65 |
if cleaned_text == "":
|
66 |
raise gr.Error('This model needs some text input to return a prediction')
|
67 |
-
elif cleaned_text != ""
|
68 |
# Tokenize the preprocessed text
|
69 |
tokenized_text = tokenizer(cleaned_text, return_tensors="pt", truncation=True, max_length=512, padding=True)
|
70 |
# Predict
|
|
|
64 |
cleaned_text = prep_text(text)
|
65 |
if cleaned_text == "":
|
66 |
raise gr.Error('This model needs some text input to return a prediction')
|
67 |
+
elif cleaned_text != "":
|
68 |
# Tokenize the preprocessed text
|
69 |
tokenized_text = tokenizer(cleaned_text, return_tensors="pt", truncation=True, max_length=512, padding=True)
|
70 |
# Predict
|