PatrickSchrML commited on
Commit
a3831a4
1 Parent(s): dafd048

empty prompt error

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -25,6 +25,8 @@ def infer(prompt, n_samples, steps, scale, seed):
25
  # print("Is GPU busy? ", is_gpu_busy)
26
  images = []
27
 
 
 
28
  url = os.getenv('BACKEND_URL_DEFAULT')
29
 
30
  response = requests.post(url, json={
 
25
  # print("Is GPU busy? ", is_gpu_busy)
26
  images = []
27
 
28
+ if prompt == "":
29
+ raise gr.Error("Empty prompt. Please provide a prompt.")
30
  url = os.getenv('BACKEND_URL_DEFAULT')
31
 
32
  response = requests.post(url, json={