Update app.py
Browse files
app.py
CHANGED
@@ -8,12 +8,14 @@ from model import Model
|
|
8 |
from settings import CACHE_EXAMPLES, MAX_SEED
|
9 |
from utils import randomize_seed_fn
|
10 |
|
|
|
|
|
11 |
def inference(prompt: str) -> str:
|
12 |
seed: int = 0
|
13 |
guidance_scale: float = 15.0
|
14 |
num_inference_steps: int = 64
|
15 |
|
16 |
-
return
|
17 |
|
18 |
demo = gr.Interface(
|
19 |
fn=inference,
|
|
|
8 |
from settings import CACHE_EXAMPLES, MAX_SEED
|
9 |
from utils import randomize_seed_fn
|
10 |
|
11 |
+
model = Model()
|
12 |
+
|
13 |
def inference(prompt: str) -> str:
|
14 |
seed: int = 0
|
15 |
guidance_scale: float = 15.0
|
16 |
num_inference_steps: int = 64
|
17 |
|
18 |
+
return model.run_text(prompt, seed, guidance_scale, num_inference_steps)
|
19 |
|
20 |
demo = gr.Interface(
|
21 |
fn=inference,
|