ayethuzar commited on
Commit
b8c0242
·
unverified ·
1 Parent(s): 362d273

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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][1])
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