Spaces:
Runtime error
Runtime error
deep-learning-analytics
commited on
Commit
•
b9c175c
1
Parent(s):
d6497a6
Update app.py
Browse files
app.py
CHANGED
@@ -23,13 +23,12 @@ def correct_grammar(input_text,num_return_sequences=num_return_sequences):
|
|
23 |
return results
|
24 |
|
25 |
##Prompts
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
st.write(generated_sequences)
|
|
|
23 |
return results
|
24 |
|
25 |
##Prompts
|
26 |
+
results = correct_grammar(sent, num_return_sequences)
|
27 |
+
|
28 |
+
generated_sequences = []
|
29 |
+
for generated_sequence_idx, generated_sequence in enumerate(results):
|
30 |
+
# Decode text
|
31 |
+
text = tokenizer.decode(generated_sequence, clean_up_tokenization_spaces=True, skip_special_tokens=True)
|
32 |
+
generated_sequences.append(text)
|
33 |
+
|
34 |
+
st.write(generated_sequences)
|
|