Pamudu13 commited on
Commit
c4ede7d
·
verified ·
1 Parent(s): 5461a6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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=None):
18
- return None
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