rajistics commited on
Commit
c6df2b8
1 Parent(s): 722ae5b

updated fin model

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -24,9 +24,9 @@ def summarize_text(text):
24
  ##Fiscal Sentiment
25
  tokenizer = AutoTokenizer.from_pretrained("demo-org/auditor_review_model",use_auth_token=auth_token)
26
  audit_model = AutoModelForSequenceClassification.from_pretrained("demo-org/auditor_review_model",use_auth_token=auth_token)
27
- nlp = pipeline("text-classification", model=audit_model, tokenizer=tokenizer)
28
  def text_to_sentiment(text):
29
- sentiment = nlp(text)[0]["label"]
30
  return sentiment
31
 
32
  ##Company Extraction
 
24
  ##Fiscal Sentiment
25
  tokenizer = AutoTokenizer.from_pretrained("demo-org/auditor_review_model",use_auth_token=auth_token)
26
  audit_model = AutoModelForSequenceClassification.from_pretrained("demo-org/auditor_review_model",use_auth_token=auth_token)
27
+ fin_model = pipeline("text-classification", model=audit_model, tokenizer=tokenizer)
28
  def text_to_sentiment(text):
29
+ sentiment = fin_model(text)[0]["label"]
30
  return sentiment
31
 
32
  ##Company Extraction