ajitrajasekharan
commited on
Commit
•
fce5f58
1
Parent(s):
946f478
Update app.py
Browse files
app.py
CHANGED
@@ -65,17 +65,7 @@ try:
|
|
65 |
top_k = 10
|
66 |
print(top_k)
|
67 |
|
68 |
-
model_name = st.sidebar.selectbox(label='Select Model to Apply', options=['ajitrajasekharan/biomedical', 'BERT'], index=0, key = "model_name")
|
69 |
-
|
70 |
-
bert_tokenizer, bert_model = load_bert_model(model_name)
|
71 |
-
default_text = "Imatinib is used to treat"
|
72 |
|
73 |
-
|
74 |
-
input_text = st.text_area(
|
75 |
-
label="Original text",
|
76 |
-
value=default_text,
|
77 |
-
)
|
78 |
-
|
79 |
start = None
|
80 |
if st.button("Submit"):
|
81 |
start = time.time()
|
@@ -85,6 +75,14 @@ try:
|
|
85 |
|
86 |
|
87 |
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
res = get_bert_prediction(input_text,top_k)
|
89 |
|
90 |
|
|
|
65 |
top_k = 10
|
66 |
print(top_k)
|
67 |
|
|
|
|
|
|
|
|
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
start = None
|
70 |
if st.button("Submit"):
|
71 |
start = time.time()
|
|
|
75 |
|
76 |
|
77 |
try:
|
78 |
+
|
79 |
+
model_name = st.sidebar.selectbox(label='Select Model to Apply', options=['ajitrajasekharan/biomedical', 'BERT'], index=0, key = "model_name")
|
80 |
+
bert_tokenizer, bert_model = load_bert_model(model_name)
|
81 |
+
default_text = "Imatinib is used to treat"
|
82 |
+
input_text = st.text_area(
|
83 |
+
label="Original text",
|
84 |
+
value=default_text,
|
85 |
+
)
|
86 |
res = get_bert_prediction(input_text,top_k)
|
87 |
|
88 |
|