cyberandy commited on
Commit
8e7625e
ยท
1 Parent(s): 1a439e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -14
app.py CHANGED
@@ -22,17 +22,15 @@ st.sidebar.image("logo-wordlift.png")
22
  language_options = {"English", "German"}
23
  selected_language = st.sidebar.selectbox("Select the Language", list(language_options), index=0)
24
 
25
- # Based on selected language, display model and entity set options
26
  if selected_language != "German":
27
- # Only show these options for languages other than German
28
- model_options = {"aida_model", "wikipedia_model_with_numbers"}
29
- selected_model_name = st.sidebar.selectbox("Select the Model", list(model_options))
30
- # Select entity_set
31
- entity_set_options = {"wikidata", "wikipedia"}
32
- selected_entity_set = st.sidebar.selectbox("Select the Entity Set", list(entity_set_options))
33
-
34
- # Add citation for Refined
35
- citation = """
36
  @inproceedings{ayoola-etal-2022-refined,
37
  title = "{R}e{F}in{ED}: An Efficient Zero-shot-capable Approach to End-to-End Entity Linking",
38
  author = "Tom Ayoola, Shubhi Tyagi, Joseph Fisher, Christos Christodoulopoulos, Andrea Pierleoni",
@@ -40,14 +38,14 @@ if selected_language != "German":
40
  year = "2022"
41
  }
42
  """
 
43
  with st.sidebar.expander('Citations'):
44
- st.markdown(citation)
45
  else:
46
  selected_model_name = None
47
  selected_entity_set = None
48
 
49
- # Add citation for entity fishing
50
- citation = """
51
  @misc{entity-fishing,
52
  title = {entity-fishing},
53
  howpublished = {\url{https://github.com/kermitt2/entity-fishing}},
@@ -57,8 +55,9 @@ else:
57
  eprint = {1:dir:cb0ba3379413db12b0018b7c3af8d0d2d864139c}
58
  }
59
  """
 
60
  with st.sidebar.expander('Citations'):
61
- st.markdown(citation)
62
 
63
  @st.cache_resource # ๐Ÿ‘ˆ Add the caching decorator
64
  def load_model(selected_language, model_name=None, entity_set=None):
 
22
  language_options = {"English", "German"}
23
  selected_language = st.sidebar.selectbox("Select the Language", list(language_options), index=0)
24
 
25
+ # Based on selected language, configure model, entity set, and citation options
26
  if selected_language != "German":
27
+ model_options = ["aida_model", "wikipedia_model_with_numbers"]
28
+ entity_set_options = ["wikidata", "wikipedia"]
29
+
30
+ selected_model_name = st.sidebar.selectbox("Select the Model", model_options)
31
+ selected_entity_set = st.sidebar.selectbox("Select the Entity Set", entity_set_options)
32
+
33
+ refined_citation = """
 
 
34
  @inproceedings{ayoola-etal-2022-refined,
35
  title = "{R}e{F}in{ED}: An Efficient Zero-shot-capable Approach to End-to-End Entity Linking",
36
  author = "Tom Ayoola, Shubhi Tyagi, Joseph Fisher, Christos Christodoulopoulos, Andrea Pierleoni",
 
38
  year = "2022"
39
  }
40
  """
41
+
42
  with st.sidebar.expander('Citations'):
43
+ st.markdown(refined_citation)
44
  else:
45
  selected_model_name = None
46
  selected_entity_set = None
47
 
48
+ entity_fishing_citation = """
 
49
  @misc{entity-fishing,
50
  title = {entity-fishing},
51
  howpublished = {\url{https://github.com/kermitt2/entity-fishing}},
 
55
  eprint = {1:dir:cb0ba3379413db12b0018b7c3af8d0d2d864139c}
56
  }
57
  """
58
+
59
  with st.sidebar.expander('Citations'):
60
+ st.markdown(entity_fishing_citation)
61
 
62
  @st.cache_resource # ๐Ÿ‘ˆ Add the caching decorator
63
  def load_model(selected_language, model_name=None, entity_set=None):