Spaces:
Sleeping
Sleeping
fix empty input catch
Browse files
app.py
CHANGED
|
@@ -10,8 +10,8 @@ You are given a short description of a person. Respond only with three different
|
|
| 10 |
"""
|
| 11 |
|
| 12 |
def get_vibe(caption):
|
| 13 |
-
if caption
|
| 14 |
-
|
| 15 |
|
| 16 |
messages = [
|
| 17 |
{"role": "system", "content": system_instruction},
|
|
|
|
| 10 |
"""
|
| 11 |
|
| 12 |
def get_vibe(caption):
|
| 13 |
+
if not caption or not caption.strip():
|
| 14 |
+
raise gr.Error("No caption provided.")
|
| 15 |
|
| 16 |
messages = [
|
| 17 |
{"role": "system", "content": system_instruction},
|