Hamda commited on
Commit
cd7dcf3
1 Parent(s): caa1fd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -9,7 +9,7 @@ import pandas as pd
9
  tokenizer = AutoTokenizer.from_pretrained("moussaKam/AraBART", padding= True, truncation=True, max_length=128)
10
  model = AutoModelForMaskedLM.from_pretrained("moussaKam/AraBART")
11
 
12
- #@st.cache
13
  def next_word(text, pipe):
14
  res_dict= {
15
  'Word':[],
@@ -33,4 +33,5 @@ dict_next_words = next_word(sent, pipe)
33
  df = pd.DataFrame.from_dict(dict_next_words)
34
  df.reset_index(drop=True, inplace=True)
35
 
36
- st.table(df)
 
 
9
  tokenizer = AutoTokenizer.from_pretrained("moussaKam/AraBART", padding= True, truncation=True, max_length=128)
10
  model = AutoModelForMaskedLM.from_pretrained("moussaKam/AraBART")
11
 
12
+ @st.cache
13
  def next_word(text, pipe):
14
  res_dict= {
15
  'Word':[],
 
33
  df = pd.DataFrame.from_dict(dict_next_words)
34
  df.reset_index(drop=True, inplace=True)
35
 
36
+ st.dataframe(df.style.highlight_max(axis=0))
37
+ #st.table(df)