jbilcke-hf HF staff commited on
Commit
0810225
1 Parent(s): 88cc598

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -74,7 +74,8 @@ def generate(prompt: str,
74
  apply_refiner: bool = False,
75
  secret_token: str = '') -> PIL.Image.Image:
76
  if secret_token != SECRET_TOKEN:
77
- raise ValueError("Invalid secret token!")
 
78
 
79
  generator = torch.Generator().manual_seed(seed)
80
 
 
74
  apply_refiner: bool = False,
75
  secret_token: str = '') -> PIL.Image.Image:
76
  if secret_token != SECRET_TOKEN:
77
+ raise gr.Error(
78
+ f'Invalid secret token. Please fork the original space if you want to use it for yourself.')
79
 
80
  generator = torch.Generator().manual_seed(seed)
81