Spaces:
Running
on
A10G
Running
on
A10G
Update app.py
Browse files
app.py
CHANGED
@@ -27,6 +27,8 @@ def predict(request: gr.Request, *args, progress=gr.Progress(track_tqdm=True)):
|
|
27 |
—/n
|
28 |
{args[0]}
|
29 |
""")
|
|
|
|
|
30 |
|
31 |
try:
|
32 |
|
@@ -41,7 +43,7 @@ def predict(request: gr.Request, *args, progress=gr.Progress(track_tqdm=True)):
|
|
41 |
status = None
|
42 |
|
43 |
if status == "Yes" :
|
44 |
-
raise gr.Error("
|
45 |
else:
|
46 |
|
47 |
headers = {'Content-Type': 'application/json'}
|
|
|
27 |
—/n
|
28 |
{args[0]}
|
29 |
""")
|
30 |
+
if args[0] == '' or args[0] is None:
|
31 |
+
raise gr.Error(f"You forgot to provide a prompt.")
|
32 |
|
33 |
try:
|
34 |
|
|
|
43 |
status = None
|
44 |
|
45 |
if status == "Yes" :
|
46 |
+
raise gr.Error("Do not ask for such things.")
|
47 |
else:
|
48 |
|
49 |
headers = {'Content-Type': 'application/json'}
|