Spaces:
Running
on
Zero
Running
on
Zero
Kavin0003
commited on
Commit
·
ed35e8f
1
Parent(s):
28e483a
✨ Updated grammar with the vennify model
Browse files
app.py
CHANGED
@@ -12,8 +12,8 @@ def correct_grammar(text):
|
|
12 |
if not text.strip():
|
13 |
return "Please enter some text to correct."
|
14 |
|
15 |
-
#
|
16 |
-
prompt = f"
|
17 |
|
18 |
try:
|
19 |
inputs = tokenizer(prompt, return_tensors="pt", truncation=True, max_length=512)
|
|
|
12 |
if not text.strip():
|
13 |
return "Please enter some text to correct."
|
14 |
|
15 |
+
# Better prompt
|
16 |
+
prompt = f"grammar: {text}"
|
17 |
|
18 |
try:
|
19 |
inputs = tokenizer(prompt, return_tensors="pt", truncation=True, max_length=512)
|