JunchuanYu commited on
Commit
153bccc
1 Parent(s): 3317827

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -3,9 +3,8 @@ from gramformer import Gramformer
3
  import spacy
4
  import gradio as gr
5
  from transformers import pipeline
6
- from gramformer import Gramformer
7
  spacy.load('en_core_web_sm')
8
- from spacy.lang.en import English
9
 
10
 
11
  def extract_str(text):
@@ -72,12 +71,12 @@ with gr.Blocks() as demo:
72
 
73
 
74
 
75
- zh_button.click(translate_zh, inputs=text_input1, outputs=chinese)
76
- en_button.click(translate_en, inputs=text_input2, outputs=english)
77
 
78
- check_button.click(gramacorrect, inputs=text_input3, outputs=check)
79
- gen_button.click(generator, inputs=text_input4, outputs=txtgenerator)
80
- demo.launch()
81
 
82
 
83
 
 
3
  import spacy
4
  import gradio as gr
5
  from transformers import pipeline
 
6
  spacy.load('en_core_web_sm')
7
+ # from spacy.lang.en import English
8
 
9
 
10
  def extract_str(text):
 
71
 
72
 
73
 
74
+ zh_button.click(translate_zh, inputs=text_input1, outputs=chinese,api_name="translate_zh")
75
+ en_button.click(translate_en, inputs=text_input2, outputs=english,api_name="translate_en")
76
 
77
+ check_button.click(gramacorrect, inputs=text_input3, outputs=check,api_name="gramacorrect")
78
+ gen_button.click(generator, inputs=text_input4, outputs=txtgenerator,api_name="generator")
79
+ demo.launch(share=True)
80
 
81
 
82