Jacobo commited on
Commit
c0e47af
1 Parent(s): 0a30cc1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -20,10 +20,10 @@ st.image("logo.png", use_column_width=False, width=150)
20
 
21
  st.title("Diogenet's Ancient Greek Syntax Analyzer")
22
 
23
- st.markdown("Here you'll find four spaCy models for processing ancient Greek. They have been trained with the Universal Dependencies datasets *Perseus* and *Proiel*. We provide two types of models for each dataset. The '_lg' models were built with tok2vec pretrained embeddings and fasttext vectors, while the '_tfr' models have a transfomers layer. You can choose among models to compare their performance. More information about the models can be found in the [Huggingface Models Hub] (https://huggingface.co/Jacobo).")
24
 
25
  st.header("Select a model:")
26
- spacy_model = st.selectbox("", ["grc_ud_perseus_lg", "grc_ud_proiel_lg","grc_ud_perseus_trf"])
27
 
28
  st.header("Enter text:")
29
  text = st.text_area("", "Πλάτων ὁ Περικτιόνης τὸ γένος ἀνέφερεν εἰς Σόλωνα.")
@@ -77,10 +77,10 @@ def visualize_parser(
77
  visualize_parser(doc)
78
 
79
 
80
- st.header("Tree View:")
81
 
82
  graph_dot = deplacy.dot(doc)
83
 
84
- st.graphviz_chart(graph_dot)
85
 
86
- visualize_tokens(doc, attrs=["text", "lemma_", "pos_", "dep_"], title="Table View:")
20
 
21
  st.title("Diogenet's Ancient Greek Syntax Analyzer")
22
 
23
+ st.markdown("Welcome to our analyzer. Here you can parse the parts of speech (POS) and the syntactic relationships of any ancient Greek sentence. This analysis is done by our two AI models trained with transformers and the NLP library spaCy. Below, you can choose which model do you want to use (each model may produce a different analysis). Documentation about the linguistic terms used by our models to annotate your sentences can be found here. If you have any questions, please contact us at mailto:diogenet@ucsd.edu")
24
 
25
  st.header("Select a model:")
26
+ spacy_model = st.selectbox("", ["grc_ud_perseus_lg_et","grc_ud_perseus_trf"])
27
 
28
  st.header("Enter text:")
29
  text = st.text_area("", "Πλάτων ὁ Περικτιόνης τὸ γένος ἀνέφερεν εἰς Σόλωνα.")
77
  visualize_parser(doc)
78
 
79
 
80
+ st.header("Tree view:")
81
 
82
  graph_dot = deplacy.dot(doc)
83
 
84
+ st.graphviz_chart(graph_dot, use_container_width=True)
85
 
86
+ visualize_tokens(doc, attrs=["text", "lemma_", "pos_", "dep_"], title="Table view:", key="tokens")