Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,13 +13,13 @@ from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
|
| 13 |
from transformers_interpret import SequenceClassificationExplainer
|
| 14 |
|
| 15 |
os.environ["TOKENIZERS_PARALLELISM"] = "false"
|
| 16 |
-
logging.basicConfig(
|
| 17 |
-
format="%(asctime)s : %(levelname)s : %(message)s", level=logging.INFO
|
| 18 |
-
)
|
| 19 |
|
| 20 |
|
| 21 |
-
def print_memory_usage():
|
| 22 |
-
logging.info(f"RAM memory % used: {psutil.virtual_memory()[2]}")
|
| 23 |
|
| 24 |
|
| 25 |
#@st.cache(allow_output_mutation=True, suppress_st_warning=True, max_entries=1)
|
|
@@ -96,7 +96,7 @@ def main():
|
|
| 96 |
)
|
| 97 |
|
| 98 |
if st.button("Interpret Text"):
|
| 99 |
-
print_memory_usage()
|
| 100 |
|
| 101 |
st.text("Output")
|
| 102 |
with st.spinner("Interpreting your text (This may take some time)"):
|
|
|
|
| 13 |
from transformers_interpret import SequenceClassificationExplainer
|
| 14 |
|
| 15 |
os.environ["TOKENIZERS_PARALLELISM"] = "false"
|
| 16 |
+
#logging.basicConfig(
|
| 17 |
+
# format="%(asctime)s : %(levelname)s : %(message)s", level=logging.INFO
|
| 18 |
+
#)
|
| 19 |
|
| 20 |
|
| 21 |
+
#def print_memory_usage():
|
| 22 |
+
# logging.info(f"RAM memory % used: {psutil.virtual_memory()[2]}")
|
| 23 |
|
| 24 |
|
| 25 |
#@st.cache(allow_output_mutation=True, suppress_st_warning=True, max_entries=1)
|
|
|
|
| 96 |
)
|
| 97 |
|
| 98 |
if st.button("Interpret Text"):
|
| 99 |
+
#print_memory_usage()
|
| 100 |
|
| 101 |
st.text("Output")
|
| 102 |
with st.spinner("Interpreting your text (This may take some time)"):
|