davertor commited on
Commit
b95247b
β€’
1 Parent(s): 5695e02

fixed minor issues

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -27,7 +27,7 @@ model_folder = 'models/'
27
  max_img_size = 800
28
  ################################
29
 
30
- @st.cache(allow_output_mutation=True)
31
  def load_model(model_dir, option):
32
  if option.lower() == 'artistic':
33
  model_url = 'https://data.deepai.org/deoldify/ColorizeArtistic_gen.pth'
@@ -224,6 +224,7 @@ try:
224
  except:
225
  colorizer = None
226
  print('Error while loading the model. Please refresh the page')
 
227
 
228
  if colorizer is not None:
229
  st_title_message.markdown("**To begin, please upload an image** πŸ‘‡")
 
27
  max_img_size = 800
28
  ################################
29
 
30
+ @st.cache(allow_output_mutation=True, show_spinner=False)
31
  def load_model(model_dir, option):
32
  if option.lower() == 'artistic':
33
  model_url = 'https://data.deepai.org/deoldify/ColorizeArtistic_gen.pth'
 
224
  except:
225
  colorizer = None
226
  print('Error while loading the model. Please refresh the page')
227
+ st_title_message.markdown("**Error while loading the model. Please refresh the page**")
228
 
229
  if colorizer is not None:
230
  st_title_message.markdown("**To begin, please upload an image** πŸ‘‡")