Spaces:
Running
Running
Upload 2 files
Browse files- app.py +1 -7
- externalmod.py +5 -1
app.py
CHANGED
@@ -14,13 +14,7 @@ current_model = models[0]
|
|
14 |
#text_gen1=gr.Interface.load("spaces/daspartho/prompt-extend")
|
15 |
#text_gen1=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link")
|
16 |
|
17 |
-
models2 = []
|
18 |
-
for model in models:
|
19 |
-
try:
|
20 |
-
models2.append(gr_Interface_load(f'models/{model}'))
|
21 |
-
except Exception as error:
|
22 |
-
print(error)
|
23 |
-
models2.append(gr.Interface(lambda: None, ['text'], ['image']))
|
24 |
|
25 |
def text_it1(inputs,text_gen1=text_gen1):
|
26 |
go_t1=text_gen1(inputs)
|
|
|
14 |
#text_gen1=gr.Interface.load("spaces/daspartho/prompt-extend")
|
15 |
#text_gen1=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link")
|
16 |
|
17 |
+
models2 = [gr_Interface_load(f"models/{m}",live=False, preprocess=True, postprocess=False) for m in models]
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
def text_it1(inputs,text_gen1=text_gen1):
|
20 |
go_t1=text_gen1(inputs)
|
externalmod.py
CHANGED
@@ -531,7 +531,11 @@ def gr_Interface_load(
|
|
531 |
alias: str | None = None,
|
532 |
**kwargs,
|
533 |
) -> Blocks:
|
534 |
-
|
|
|
|
|
|
|
|
|
535 |
|
536 |
|
537 |
def list_uniq(l):
|
|
|
531 |
alias: str | None = None,
|
532 |
**kwargs,
|
533 |
) -> Blocks:
|
534 |
+
try:
|
535 |
+
return load_blocks_from_repo(name, src, hf_token, alias)
|
536 |
+
except Exception as e:
|
537 |
+
print(e)
|
538 |
+
return gradio.Interface(lambda: None, ['text'], ['image'])
|
539 |
|
540 |
|
541 |
def list_uniq(l):
|