Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -53,9 +53,9 @@ tokenizer = AutoTokenizer.from_pretrained(model_name)
|
|
53 |
|
54 |
text = [user_input_abstract + user_input_claims]
|
55 |
|
56 |
-
testing = "text " + user_input_abstract
|
57 |
-
testing_str = f"{text}"
|
58 |
-
st.markdown(testing_str, unsafe_allow_html=True)
|
59 |
|
60 |
if submit:
|
61 |
batch = tokenizer(text, padding = True, truncation = True, max_length = 512, return_tensors = "pt")
|
@@ -64,7 +64,7 @@ if submit:
|
|
64 |
outputs = model(**batch)
|
65 |
#st.write(outputs)
|
66 |
predictions = F.softmax(outputs.logits, dim = 1)
|
67 |
-
result = "Patentability Score: " + str(predictions.numpy()[0]
|
68 |
html_str = f"""<style>p.a {{font: bold {28}px Courier;color:#1D5D9B;}}</style><p class="a">{result}</p>"""
|
69 |
st.markdown(html_str, unsafe_allow_html=True)
|
70 |
|
|
|
53 |
|
54 |
text = [user_input_abstract + user_input_claims]
|
55 |
|
56 |
+
#testing = "text " + user_input_abstract
|
57 |
+
#testing_str = f"{text}"
|
58 |
+
#st.markdown(testing_str, unsafe_allow_html=True)
|
59 |
|
60 |
if submit:
|
61 |
batch = tokenizer(text, padding = True, truncation = True, max_length = 512, return_tensors = "pt")
|
|
|
64 |
outputs = model(**batch)
|
65 |
#st.write(outputs)
|
66 |
predictions = F.softmax(outputs.logits, dim = 1)
|
67 |
+
result = "Patentability Score: " + str(predictions.numpy()[0])
|
68 |
html_str = f"""<style>p.a {{font: bold {28}px Courier;color:#1D5D9B;}}</style><p class="a">{result}</p>"""
|
69 |
st.markdown(html_str, unsafe_allow_html=True)
|
70 |
|