Spaces:
Running
on
L4
Running
on
L4
simonduerr
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,9 @@ if not os.path.exists(model):
|
|
39 |
@spaces.GPU(duration=120)
|
40 |
def predict(jobname, inputs, recycling_steps, sampling_steps, diffusion_samples):
|
41 |
jobname = re.sub(r'[<>:"/\\|?*]', '_', jobname)
|
42 |
-
|
|
|
|
|
43 |
"""format Gradio Component:
|
44 |
# {"chains": [
|
45 |
# {
|
|
|
39 |
@spaces.GPU(duration=120)
|
40 |
def predict(jobname, inputs, recycling_steps, sampling_steps, diffusion_samples):
|
41 |
jobname = re.sub(r'[<>:"/\\|?*]', '_', jobname)
|
42 |
+
if jobname == "":
|
43 |
+
raise gr.Error("Job name empty or only invalid characters. Choose a plaintext name.")
|
44 |
+
os.makedirs(jobname, exist_ok=True)
|
45 |
"""format Gradio Component:
|
46 |
# {"chains": [
|
47 |
# {
|