Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,8 +15,8 @@ text = st.text_area('enter some text!')
|
|
15 |
|
16 |
|
17 |
if text:
|
18 |
-
translated = translator.translate(text
|
19 |
-
encoded_input = tokenizer(translated, return_tensors='pt')
|
20 |
output = model(**encoded_input)
|
21 |
|
22 |
results = output.logits.detach().cpu().numpy()[0].argsort()[::-1][:5]
|
|
|
15 |
|
16 |
|
17 |
if text:
|
18 |
+
translated = translator.translate(text)
|
19 |
+
encoded_input = tokenizer(translated.text, return_tensors='pt')
|
20 |
output = model(**encoded_input)
|
21 |
|
22 |
results = output.logits.detach().cpu().numpy()[0].argsort()[::-1][:5]
|