Dagobert42 commited on
Commit
125cf0c
1 Parent(s): 372cb74

checking pipeline output

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +4 -7
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  title: Semantic Frame Augmentation
3
- emoji: 🚀
4
  colorFrom: gray
5
  colorTo: yellow
6
  sdk: streamlit
 
1
  ---
2
  title: Semantic Frame Augmentation
3
+ emoji: 🔬
4
  colorFrom: gray
5
  colorTo: yellow
6
  sdk: streamlit
app.py CHANGED
@@ -5,6 +5,7 @@ from random import choice
5
 
6
  with open("sentences.pt", 'rb') as f:
7
  sentences = torch.load(f)
 
8
 
9
  baseline_classifier = pipeline(
10
  model="Dagobert42/mobilebert-uncased-biored-finetuned-ner",
@@ -20,10 +21,8 @@ augmented_classifier = pipeline(
20
  st.title("Semantic Frame Augmentation")
21
  st.caption("Analysing difficult low-resource domains with only a handful of examples")
22
 
23
- st.write("This space uses a googel/mobilebert-uncased model for named entity ")
24
- augment = st.toggle('Use augmented model for ', value=False)
25
-
26
- sentence = choice(sentences)
27
 
28
  if augment:
29
  st.write("with augmentation:")
@@ -39,6 +38,4 @@ txt = st.text_area(
39
  )
40
 
41
  st.subheader("Entity analysis:")
42
- for token in tokens:
43
- st.write(token['entity_group'])
44
- st.write(sentence[token["start"] : token["end"]])
 
5
 
6
  with open("sentences.pt", 'rb') as f:
7
  sentences = torch.load(f)
8
+ sentence = choice(sentences)
9
 
10
  baseline_classifier = pipeline(
11
  model="Dagobert42/mobilebert-uncased-biored-finetuned-ner",
 
21
  st.title("Semantic Frame Augmentation")
22
  st.caption("Analysing difficult low-resource domains with only a handful of examples")
23
 
24
+ st.write("This space uses a googel/mobilebert-uncased model for NER")
25
+ augment = st.toggle('Use augmented model for NER', value=False)
 
 
26
 
27
  if augment:
28
  st.write("with augmentation:")
 
38
  )
39
 
40
  st.subheader("Entity analysis:")
41
+ st.write(tokens)