Update app.py
Browse files
app.py
CHANGED
@@ -22,12 +22,9 @@ def load_fn(models):
|
|
22 |
try:
|
23 |
m = gr.load(f'models/{model}')
|
24 |
except Exception as error:
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
inputs=gr.Textbox(label="Input Prompt"),
|
29 |
-
outputs=gr.Textbox(label="Output"),
|
30 |
-
)
|
31 |
|
32 |
|
33 |
load_fn(models)
|
|
|
22 |
try:
|
23 |
m = gr.load(f'models/{model}')
|
24 |
except Exception as error:
|
25 |
+
print(f"Error loading model {model}: {error}")
|
26 |
+
# Fallback to a dummy interface with valid components
|
27 |
+
m = gr.Interface(lambda txt: None, inputs=gr.Textbox(), outputs=gr.Image())
|
|
|
|
|
|
|
28 |
|
29 |
|
30 |
load_fn(models)
|