khanfou
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import streamlit as st
|
2 |
from datasets import load_dataset
|
|
|
3 |
import pandas as pd
|
4 |
|
5 |
from datasets import load_dataset
|
@@ -26,8 +27,15 @@ st.title('Harvard USPTO Patentability Score')
|
|
26 |
with st.form("patent-form"):
|
27 |
make_choice = st.selectbox('Select the Patent Application Number:', PAN)
|
28 |
submitted = st.form_submit_button(label='submit')
|
|
|
29 |
if submitted:
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
######NEW
|
32 |
|
33 |
pd.options.display.max_colwidth = 100000
|
|
|
1 |
import streamlit as st
|
2 |
from datasets import load_dataset
|
3 |
+
from transformers import pipeline
|
4 |
import pandas as pd
|
5 |
|
6 |
from datasets import load_dataset
|
|
|
27 |
with st.form("patent-form"):
|
28 |
make_choice = st.selectbox('Select the Patent Application Number:', PAN)
|
29 |
submitted = st.form_submit_button(label='submit')
|
30 |
+
|
31 |
if submitted:
|
32 |
+
#st.write("Outside the form")
|
33 |
+
hupd_model = pipeline(task="fill-mask", model="turingmachine/hupd-distilroberta-base")
|
34 |
+
result = hupd_model(make_choice)[0]
|
35 |
+
score = result['score']
|
36 |
+
st.write("The Patentability Score is:", score)
|
37 |
+
else:
|
38 |
+
st.write("Please Select a Patent Application Number!!")
|
39 |
######NEW
|
40 |
|
41 |
pd.options.display.max_colwidth = 100000
|