MUmairAB commited on
Commit
37361c0
1 Parent(s): d1eaeb1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,8 +2,8 @@
2
  import streamlit as st
3
  from transformers import pipeline
4
  #Import the model
5
- model = pipeline(task="fill-mask",
6
- model="MUmairAB/bert-based-MaskedLM")
7
  """
8
  Typically, the model should be imported within a function. However, in this case, we are downloading it outside the function to avoid a significant delay that could annoy the user when downloading it inside the main function. By loading the model at this point, it will be downloaded when the app runs, and the user will overlook this initial loading time, as opposed to experiencing a delay after entering the input.
9
  """
 
2
  import streamlit as st
3
  from transformers import pipeline
4
  #Import the model
5
+ model = pipeline(task="fill-mask",
6
+ model="MUmairAB/bert-based-MaskedLM")
7
  """
8
  Typically, the model should be imported within a function. However, in this case, we are downloading it outside the function to avoid a significant delay that could annoy the user when downloading it inside the main function. By loading the model at this point, it will be downloaded when the app runs, and the user will overlook this initial loading time, as opposed to experiencing a delay after entering the input.
9
  """