rajistics commited on
Commit
b066ee8
1 Parent(s): 43c6f10

Updated models

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -37,7 +37,9 @@ def summarize_text(text):
37
  return stext
38
 
39
  ##Fiscal Tone Analysis
40
- fin_model= pipeline("sentiment-analysis", model='yiyanghkust/finbert-tone', tokenizer='yiyanghkust/finbert-tone')
 
 
41
  def text_to_sentiment(text):
42
  sentiment = fin_model(text)[0]["label"]
43
  return sentiment
@@ -55,7 +57,7 @@ def fin_ext(text):
55
 
56
  ##Forward Looking Statement
57
  def fls(text):
58
- fls_model = pipeline("text-classification", model="yiyanghkust/finbert-fls", tokenizer="yiyanghkust/finbert-fls")
59
  results = fls_model(split_in_sentences(text))
60
  return make_spans(text,results)
61
 
 
37
  return stext
38
 
39
  ##Fiscal Tone Analysis
40
+
41
+ model = AutoModelForSequenceClassification.from_pretrained("FinanceInc/auditor_sentiment_finetuned")
42
+ fin_model= pipeline("sentiment-analysis", model='FinanceInc/auditor_sentiment_finetuned', tokenizer='FinanceInc/auditor_sentiment_finetuned')
43
  def text_to_sentiment(text):
44
  sentiment = fin_model(text)[0]["label"]
45
  return sentiment
 
57
 
58
  ##Forward Looking Statement
59
  def fls(text):
60
+ fls_model = pipeline("text-classification", model="FinanceInc/finbert_fls", tokenizer="FinanceInc/finbert_fls")
61
  results = fls_model(split_in_sentences(text))
62
  return make_spans(text,results)
63