Spaces:
Runtime error
Runtime error
JunchuanYu
commited on
Commit
·
a0fa14a
1
Parent(s):
57071ff
Update app.py
Browse files
app.py
CHANGED
@@ -14,6 +14,7 @@ def extract_str(text):
|
|
14 |
return text[start+2:end]
|
15 |
|
16 |
def gramacorrect(sentence):
|
|
|
17 |
res = gf.correct(sentence) # Gramformer correct
|
18 |
return extract_str(res) # Return first value in res array
|
19 |
|
|
|
14 |
return text[start+2:end]
|
15 |
|
16 |
def gramacorrect(sentence):
|
17 |
+
gf = Gramformer(models=1, use_gpu=True)
|
18 |
res = gf.correct(sentence) # Gramformer correct
|
19 |
return extract_str(res) # Return first value in res array
|
20 |
|