Update app.py
Browse files
app.py
CHANGED
@@ -41,9 +41,8 @@ def extend_prompt(input_text):
|
|
41 |
return extended_prompt
|
42 |
|
43 |
def generate_image(prompt, selected_model, is_negative=False, steps=1, cfg_scale=6, seed=None):
|
44 |
-
if not
|
45 |
-
gr.
|
46 |
-
return None
|
47 |
|
48 |
model_url = select_model(selected_model)
|
49 |
API_URL = f"{model_url}"
|
|
|
41 |
return extended_prompt
|
42 |
|
43 |
def generate_image(prompt, selected_model, is_negative=False, steps=1, cfg_scale=6, seed=None):
|
44 |
+
if not prompt.strip():
|
45 |
+
raise gr.Error("Cannot generate image: Input text is empty!")
|
|
|
46 |
|
47 |
model_url = select_model(selected_model)
|
48 |
API_URL = f"{model_url}"
|