Spaces:
Runtime error
Runtime error
Commit
·
e62e803
1
Parent(s):
4a7efc0
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,8 @@ import plotly.graph_objs as go
|
|
18 |
import pandas as pd
|
19 |
import plotly.offline as pyo
|
20 |
|
21 |
-
|
|
|
22 |
def get_nl():
|
23 |
return nltk.download('punkt')
|
24 |
get_nl()
|
@@ -31,7 +32,8 @@ from transformers import pipeline
|
|
31 |
# os.remove("report.html")
|
32 |
|
33 |
|
34 |
-
|
|
|
35 |
def get_model():
|
36 |
tokenizer = AutoTokenizer.from_pretrained("ProsusAI/finbert")
|
37 |
model = AutoModelForSequenceClassification.from_pretrained("ProsusAI/finbert")
|
|
|
18 |
import pandas as pd
|
19 |
import plotly.offline as pyo
|
20 |
|
21 |
+
#@st.cache_resource()
|
22 |
+
@st.cache()
|
23 |
def get_nl():
|
24 |
return nltk.download('punkt')
|
25 |
get_nl()
|
|
|
32 |
# os.remove("report.html")
|
33 |
|
34 |
|
35 |
+
#@st.cache_resource()
|
36 |
+
@st.cache(allow_output_mutation=True)
|
37 |
def get_model():
|
38 |
tokenizer = AutoTokenizer.from_pretrained("ProsusAI/finbert")
|
39 |
model = AutoModelForSequenceClassification.from_pretrained("ProsusAI/finbert")
|