Spaces:
Runtime error
Runtime error
add print statements for debugging
Browse files
app.py
CHANGED
@@ -29,10 +29,11 @@ def load_model(model_name):
|
|
29 |
AutoTokenizer.from_pretrained(model_name),
|
30 |
)
|
31 |
|
32 |
-
|
33 |
def main():
|
34 |
|
35 |
st.title("Transformers Interpet Demo App")
|
|
|
36 |
|
37 |
image = Image.open("./images/tight@1920x_transparent.png")
|
38 |
st.sidebar.image(image, use_column_width=True)
|
@@ -61,6 +62,7 @@ def main():
|
|
61 |
"Choose a classification model", list(models.keys())
|
62 |
)
|
63 |
model, tokenizer = load_model(model_name)
|
|
|
64 |
if model_name.startswith("textattack/"):
|
65 |
model.config.id2label = {0: "NEGATIVE (0) ", 1: "POSITIVE (1)"}
|
66 |
model.eval()
|
|
|
29 |
AutoTokenizer.from_pretrained(model_name),
|
30 |
)
|
31 |
|
32 |
+
print ("before main")
|
33 |
def main():
|
34 |
|
35 |
st.title("Transformers Interpet Demo App")
|
36 |
+
print ("before main")
|
37 |
|
38 |
image = Image.open("./images/tight@1920x_transparent.png")
|
39 |
st.sidebar.image(image, use_column_width=True)
|
|
|
62 |
"Choose a classification model", list(models.keys())
|
63 |
)
|
64 |
model, tokenizer = load_model(model_name)
|
65 |
+
print ("Model loaded")
|
66 |
if model_name.startswith("textattack/"):
|
67 |
model.config.id2label = {0: "NEGATIVE (0) ", 1: "POSITIVE (1)"}
|
68 |
model.eval()
|