Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -51,11 +51,11 @@ model_name = "ayethuzar/tuned-for-patentability"
|
|
51 |
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
52 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
53 |
|
54 |
-
|
55 |
-
st.
|
56 |
|
57 |
if submit:
|
58 |
-
batch = tokenizer(
|
59 |
|
60 |
with torch.no_grad():
|
61 |
outputs = model(**batch)
|
|
|
51 |
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
52 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
53 |
|
54 |
+
text = [user_input_abstract[0] + user_input_claims[0]]
|
55 |
+
st.success(f'text: {text}')
|
56 |
|
57 |
if submit:
|
58 |
+
batch = tokenizer(text, padding = True, truncation = True, max_length = 512, return_tensors = "pt")
|
59 |
|
60 |
with torch.no_grad():
|
61 |
outputs = model(**batch)
|