deep-learning-analytics commited on
Commit
b9c175c
1 Parent(s): d6497a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -10
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
- if sent:
27
- results = correct_grammar(sent, num_return_sequences)
28
-
29
- generated_sequences = []
30
- for generated_sequence_idx, generated_sequence in enumerate(results):
31
- # Decode text
32
- text = tokenizer.decode(generated_sequence, clean_up_tokenization_spaces=True, skip_special_tokens=True)
33
- generated_sequences.append(text)
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)