Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,12 +18,10 @@ def make_spans(text,results):
|
|
18 |
facts_spans = list(zip(split_in_sentences(text),results_list))
|
19 |
return facts_spans
|
20 |
|
21 |
-
##Fiscal Tone Analysis
|
22 |
|
23 |
-
model = AutoModelForSequenceClassification.from_pretrained("FinanceInc/auditor_sentiment_finetuned")
|
24 |
-
fin_model= pipeline("sentiment-analysis", model='FinanceInc/auditor_sentiment_finetuned', tokenizer='FinanceInc/auditor_sentiment_finetuned')
|
25 |
|
26 |
##Fiscal Sentiment by Sentence
|
|
|
27 |
def fin_ext(text):
|
28 |
results = fin_model(split_in_sentences(text))
|
29 |
return make_spans(text,results)
|
|
|
18 |
facts_spans = list(zip(split_in_sentences(text),results_list))
|
19 |
return facts_spans
|
20 |
|
|
|
21 |
|
|
|
|
|
22 |
|
23 |
##Fiscal Sentiment by Sentence
|
24 |
+
fin_model= pipeline("sentiment-analysis", model='FinanceInc/auditor_sentiment_finetuned', tokenizer='FinanceInc/auditor_sentiment_finetuned')
|
25 |
def fin_ext(text):
|
26 |
results = fin_model(split_in_sentences(text))
|
27 |
return make_spans(text,results)
|