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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -4,8 +4,7 @@ from transformers import BertJapaneseTokenizer, BertForSequenceClassification
4
 
5
  # 日本語の事前学習モデル
6
  MODEL_NAME = 'cl-tohoku/bert-base-japanese-whole-word-masking'
7
- descriptions = '''BERTをchABSA-dataset※でファインチューニングしたモデルになります。
8
- ※chABSA-datasetは上場企業の有価証券報告書をベースに作成されたネガポジ用データセット'''
9
 
10
  tokenizer = BertJapaneseTokenizer.from_pretrained(MODEL_NAME)
11
  bert_sc_ = BertForSequenceClassification.from_pretrained("models/")
@@ -30,5 +29,5 @@ def func(text):
30
 
31
  return label,cos
32
 
33
- app = gr.Interface(fn=func, inputs=gr.Textbox(lines=3, placeholder="文章を入力してください"), outputs=["label","label"], title="ビジネス文書のネガポジ分析", description=descriptions)
34
  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 App in Business", description=descriptions)
33
  app.launch()