aino813 commited on
Commit
bdbf479
1 Parent(s): 61b0fe6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ from transformers import BertJapaneseTokenizer, BertForSequenceClassification
4
 
5
  # 日本語の事前学習モデル
6
  MODEL_NAME = 'cl-tohoku/bert-base-japanese-whole-word-masking'
7
- descriptions = '''BERTを用いたビジネス文書のネガポジ判定。判定結果と信頼度を表示します。'''
8
 
9
  tokenizer = BertJapaneseTokenizer.from_pretrained(MODEL_NAME)
10
  bert_sc_ = BertForSequenceClassification.from_pretrained("models/")
@@ -29,5 +29,5 @@ def func(text):
29
 
30
  return label,cos
31
 
32
- app = gr.Interface(fn=func, inputs=gr.Textbox(lines=3, placeholder="文章を入力してください"), outputs=["label","label"], title="Sentiment Analysis App in Business", description=descriptions)
33
  app.launch()
 
4
 
5
  # 日本語の事前学習モデル
6
  MODEL_NAME = 'cl-tohoku/bert-base-japanese-whole-word-masking'
7
+ descriptions = '''BERTを用いたビジネス文書のネガポジ判定。文章を入力すると、その文章のネガポジ判定と判定の信頼度を表示します。'''
8
 
9
  tokenizer = BertJapaneseTokenizer.from_pretrained(MODEL_NAME)
10
  bert_sc_ = BertForSequenceClassification.from_pretrained("models/")
 
29
 
30
  return label,cos
31
 
32
+ app = gr.Interface(fn=func, inputs=gr.Textbox(lines=3, placeholder="文章を入力してください"), outputs=["label","label"], title="Sentiment Analysis of Business Documents", description=descriptions)
33
  app.launch()