Rik Bose commited on
Commit
06e92f0
·
1 Parent(s): 21e2a3f
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -1,5 +1,15 @@
1
  import streamlit as st
2
 
 
 
 
 
 
3
  from transformers import pipeline
4
  nlp = pipeline("fill-mask", model="roberta-base")
5
- nlp(f"This is the best thing I've {nlp.tokenizer.mask_token} in my life.")
 
 
 
 
 
 
1
  import streamlit as st
2
 
3
+ # Create a text element and let the reader know the data is loading.
4
+ data_load_state = st.text('Loading data...')
5
+ # Load 10,000 rows of data into the dataframe.
6
+ data = load_data(10000)
7
+ # Notify the reader that the data was successfully loaded.
8
  from transformers import pipeline
9
  nlp = pipeline("fill-mask", model="roberta-base")
10
+ result = nlp(f"This is the best thing I've {nlp.tokenizer.mask_token} in my life.")
11
+
12
+ data_load_state.text('Loading data...done!')
13
+
14
+ for d in result:
15
+ st.write(str(d["score"])+"\n"+d["sequence])