Hamda commited on
Commit
dee9089
1 Parent(s): e7bd68e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -22,7 +22,7 @@ def next_word(text, pipe):
22
 
23
  st.title("Predict Next Word")
24
  st.write("Expand your query by leveraging various models")
25
- default_value = "التاريخ هو تحليل و"
26
  # sent is the variable holding the user's input
27
  sent = st.text_area("Input", default_value, height=30)
28
  if len(sent)>20:
@@ -34,12 +34,9 @@ else:
34
  pipe = pipeline("fill-mask", tokenizer=tokenizer, model=model)
35
  dict_next_words = next_word(text_st, pipe)
36
  df = pd.DataFrame.from_dict(dict_next_words)
37
- #df.reset_index(drop=True, inplace=True)
38
 
39
  st.dataframe(df)
40
- st.bar_chart(df)
41
- #st.dataframe(df)
42
 
43
- #st.bar_chart(df)
44
 
45
  #st.table(df)
 
22
 
23
  st.title("Predict Next Word")
24
  st.write("Expand your query by leveraging various models")
25
+ default_value = "بيعت الأسلحة في السوق"
26
  # sent is the variable holding the user's input
27
  sent = st.text_area("Input", default_value, height=30)
28
  if len(sent)>20:
 
34
  pipe = pipeline("fill-mask", tokenizer=tokenizer, model=model)
35
  dict_next_words = next_word(text_st, pipe)
36
  df = pd.DataFrame.from_dict(dict_next_words)
37
+ df.reset_index(drop=True, inplace=True)
38
 
39
  st.dataframe(df)
 
 
40
 
 
41
 
42
  #st.table(df)