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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -4,9 +4,8 @@ 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
- """
10
 
11
 
12
 
 
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
 
10
 
11