Commit
·
f48c169
1
Parent(s):
acfdab2
Refactor import statement in models.py to add gradio module
Browse files- tabs/images/models.py +2 -0
tabs/images/models.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
from typing import List, Optional, Dict, Any
|
2 |
|
|
|
3 |
from pydantic import BaseModel, field_validator
|
4 |
from PIL import Image
|
5 |
|
@@ -42,6 +43,7 @@ class BaseReq(BaseModel):
|
|
42 |
@field_validator('model', 'negative_prompt', 'embeddings', 'clip_skip', 'controlnet_config')
|
43 |
def check_model(cls, values):
|
44 |
for m in appConfig.IMAGES_MODELS:
|
|
|
45 |
if m.get('repo_id') == values.get('model'):
|
46 |
loader = m.get('loader')
|
47 |
|
|
|
1 |
from typing import List, Optional, Dict, Any
|
2 |
|
3 |
+
import gradio as gr
|
4 |
from pydantic import BaseModel, field_validator
|
5 |
from PIL import Image
|
6 |
|
|
|
43 |
@field_validator('model', 'negative_prompt', 'embeddings', 'clip_skip', 'controlnet_config')
|
44 |
def check_model(cls, values):
|
45 |
for m in appConfig.IMAGES_MODELS:
|
46 |
+
gr.Info(f'{m.get('repo_id')} {values.get('model')}')
|
47 |
if m.get('repo_id') == values.get('model'):
|
48 |
loader = m.get('loader')
|
49 |
|