Spaces:
Runtime error
Runtime error
Update ✨Entity Linking Application✨.py
Browse files
✨Entity Linking Application✨.py
CHANGED
|
@@ -272,6 +272,9 @@ def main_cli():
|
|
| 272 |
|
| 273 |
if "disabled" not in st.session_state:
|
| 274 |
st.session_state.disabled = False
|
|
|
|
|
|
|
|
|
|
| 275 |
|
| 276 |
api_token = st.text_input("Enter your API key from [GitHub](https://github.com/marketplace/models/azure-openai/gpt-4o):", "", type="password", disabled=st.session_state.disabled)
|
| 277 |
|
|
@@ -292,7 +295,7 @@ def main_cli():
|
|
| 292 |
combi = st.selectbox("Make combinations of each word? (Useful for difficult mentions)", ['Yes', 'No'], index=1, disabled=st.session_state.disabled)
|
| 293 |
disambi = st.selectbox("Run acronym disambiguation? (Enable it if the mention include an acronym or if it is nested)", ['Yes', 'No'], index=0, disabled=st.session_state.disabled)
|
| 294 |
|
| 295 |
-
if st.button("Run Entity Linking", key="disabled
|
| 296 |
if input_sentence_user and input_mention_user:
|
| 297 |
# check if the mention is in the sentence
|
| 298 |
if input_mention_user in input_sentence_user:
|
|
|
|
| 272 |
|
| 273 |
if "disabled" not in st.session_state:
|
| 274 |
st.session_state.disabled = False
|
| 275 |
+
|
| 276 |
+
if "button_disabled" not in st.session_state:
|
| 277 |
+
st.session_state.button_disabled = False
|
| 278 |
|
| 279 |
api_token = st.text_input("Enter your API key from [GitHub](https://github.com/marketplace/models/azure-openai/gpt-4o):", "", type="password", disabled=st.session_state.disabled)
|
| 280 |
|
|
|
|
| 295 |
combi = st.selectbox("Make combinations of each word? (Useful for difficult mentions)", ['Yes', 'No'], index=1, disabled=st.session_state.disabled)
|
| 296 |
disambi = st.selectbox("Run acronym disambiguation? (Enable it if the mention include an acronym or if it is nested)", ['Yes', 'No'], index=0, disabled=st.session_state.disabled)
|
| 297 |
|
| 298 |
+
if st.button("Run Entity Linking", key="button_disabled", disabled=st.session_state.button_disabled):
|
| 299 |
if input_sentence_user and input_mention_user:
|
| 300 |
# check if the mention is in the sentence
|
| 301 |
if input_mention_user in input_sentence_user:
|