Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,8 @@ for model_path in models:
|
|
14 |
try:
|
15 |
model_functions[model_idx] = gr.Interface.load(f"models/{model_path}", live=False, preprocess=True, postprocess=False)
|
16 |
except Exception as error:
|
17 |
-
def the_fn(txt, seed=
|
18 |
-
return
|
19 |
model_functions[model_idx] = gr.Interface(fn=the_fn, inputs=["text", "number"], outputs=["image"])
|
20 |
model_idx += 1
|
21 |
|
|
|
14 |
try:
|
15 |
model_functions[model_idx] = gr.Interface.load(f"models/{model_path}", live=False, preprocess=True, postprocess=False)
|
16 |
except Exception as error:
|
17 |
+
def the_fn(txt, seed=random.randint(0, 2**32 - 1)):
|
18 |
+
return random.randint(0, 2**32 - 1)
|
19 |
model_functions[model_idx] = gr.Interface(fn=the_fn, inputs=["text", "number"], outputs=["image"])
|
20 |
model_idx += 1
|
21 |
|