Spaces:
Runtime error
Runtime error
salmanmapkar
commited on
Commit
•
0c92e5a
1
Parent(s):
5bcaa28
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ from transformers import T5ForConditionalGeneration, T5Tokenizer
|
|
32 |
__FILES = set()
|
33 |
wispher_models = list(whisper._MODELS.keys())
|
34 |
|
35 |
-
def correct_grammar(input_text,num_return_sequences=
|
36 |
torch_device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
37 |
tokenizer = T5Tokenizer.from_pretrained('deep-learning-analytics/GrammarCorrector')
|
38 |
model = T5ForConditionalGeneration.from_pretrained('deep-learning-analytics/GrammarCorrector').to(torch_device)
|
|
|
32 |
__FILES = set()
|
33 |
wispher_models = list(whisper._MODELS.keys())
|
34 |
|
35 |
+
def correct_grammar(input_text,num_return_sequences=1):
|
36 |
torch_device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
37 |
tokenizer = T5Tokenizer.from_pretrained('deep-learning-analytics/GrammarCorrector')
|
38 |
model = T5ForConditionalGeneration.from_pretrained('deep-learning-analytics/GrammarCorrector').to(torch_device)
|