Spaces:
Runtime error
Runtime error
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +3 -2
src/streamlit_app.py
CHANGED
|
@@ -2,8 +2,9 @@ import streamlit as st
|
|
| 2 |
from transformers import pipeline
|
| 3 |
import os
|
| 4 |
|
| 5 |
-
|
| 6 |
-
os.
|
|
|
|
| 7 |
# Load the sentiment analysis pipeline with your fine-tuned model
|
| 8 |
@st.cache_resource
|
| 9 |
def load_model():
|
|
|
|
| 2 |
from transformers import pipeline
|
| 3 |
import os
|
| 4 |
|
| 5 |
+
streamlit_data_dir = "/app/.streamlit"
|
| 6 |
+
os.environ["STREAMLIT_GLOBAL_DATA"] = streamlit_data_dir
|
| 7 |
+
os.makedirs(streamlit_data_dir, exist_ok=True)
|
| 8 |
# Load the sentiment analysis pipeline with your fine-tuned model
|
| 9 |
@st.cache_resource
|
| 10 |
def load_model():
|