Spaces:
Build error
Build error
updated fin model
Browse files
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 |
-
|
| 28 |
def text_to_sentiment(text):
|
| 29 |
-
sentiment =
|
| 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
|