Hamda commited on
Commit
30ba48b
·
1 Parent(s): dee9089

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -25,11 +25,7 @@ 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:
29
- text_st = sent[-20:]
30
- text_st += ' <mask>'
31
- else:
32
- text_st = sent+ ' <mask>'
33
 
34
  pipe = pipeline("fill-mask", tokenizer=tokenizer, model=model)
35
  dict_next_words = next_word(text_st, pipe)
 
25
  default_value = "بيعت الأسلحة في السوق"
26
  # sent is the variable holding the user's input
27
  sent = st.text_area("Input", default_value, height=30)
28
+ text_st = sent+ ' <mask>'
 
 
 
 
29
 
30
  pipe = pipeline("fill-mask", tokenizer=tokenizer, model=model)
31
  dict_next_words = next_word(text_st, pipe)