Spaces:
Build error
Build error
Fixed OS
Browse files
app.py
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
|
|
| 1 |
os.system("pip install gradio==3.0.18")
|
| 2 |
from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification, AutoModelForTokenClassification
|
| 3 |
import gradio as gr
|
| 4 |
-
|
| 5 |
import spacy
|
| 6 |
nlp = spacy.load('en_core_web_sm')
|
| 7 |
|
|
@@ -24,7 +25,8 @@ def summarize_text(text):
|
|
| 24 |
return stext
|
| 25 |
|
| 26 |
##Fiscal Sentiment
|
| 27 |
-
#fin_model = pipeline("text-classification", model="demo-org/auditor_review_model",
|
|
|
|
| 28 |
fin_model = pipeline("text-classification")
|
| 29 |
def text_to_sentiment(text):
|
| 30 |
sentiment = fin_model(text)[0]["label"]
|
|
|
|
| 1 |
+
import os
|
| 2 |
os.system("pip install gradio==3.0.18")
|
| 3 |
from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification, AutoModelForTokenClassification
|
| 4 |
import gradio as gr
|
| 5 |
+
|
| 6 |
import spacy
|
| 7 |
nlp = spacy.load('en_core_web_sm')
|
| 8 |
|
|
|
|
| 25 |
return stext
|
| 26 |
|
| 27 |
##Fiscal Sentiment
|
| 28 |
+
#fin_model = pipeline("text-classification", model="demo-org/auditor_review_model",
|
| 29 |
+
# tokenizer="demo-org/auditor_review_model",use_auth_token=auth_token)
|
| 30 |
fin_model = pipeline("text-classification")
|
| 31 |
def text_to_sentiment(text):
|
| 32 |
sentiment = fin_model(text)[0]["label"]
|