abdulmatinomotoso commited on
Commit
2bcc8be
1 Parent(s): 8691a80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,7 +8,7 @@ model_name = "abdulmatinomotoso/English_Grammar_Checker"
8
  model = AutoModelForSequenceClassification.from_pretrained(model_name)
9
  tokenizer = AutoTokenizer.from_pretrained(model_name)
10
 
11
- def get_emotion(sentence):
12
  input_tensor = tokenizer.encode(sentence, return_tensors="pt")
13
  logits = model(input_tensor).logits
14
 
@@ -20,7 +20,7 @@ def get_emotion(sentence):
20
 
21
  return result
22
 
23
- demo = gr.Interface(get_emotion, inputs=['text'],
24
  outputs="text",
25
  title = "English Grammar Checker")
26
 
 
8
  model = AutoModelForSequenceClassification.from_pretrained(model_name)
9
  tokenizer = AutoTokenizer.from_pretrained(model_name)
10
 
11
+ def check_grammar(sentence):
12
  input_tensor = tokenizer.encode(sentence, return_tensors="pt")
13
  logits = model(input_tensor).logits
14
 
 
20
 
21
  return result
22
 
23
+ demo = gr.Interface(check_grammar, inputs=['text'],
24
  outputs="text",
25
  title = "English Grammar Checker")
26