Update app.py
Browse files
app.py
CHANGED
|
@@ -22,8 +22,8 @@ from fastapi import FastAPI
|
|
| 22 |
app = FastAPI()
|
| 23 |
@app.get("/")
|
| 24 |
|
| 25 |
-
def query(prompt, negative_prompt, task, steps=35, sampler="DPM++ 2M Karras", cfg_scale=7, seed=-1, width=896, height=1152):
|
| 26 |
-
result = {prompt:"prompt", negative_prompt:"negative_prompt", task:"task", steps:"steps", sampler:"sampler", cfg_scale:"cfg_scale", seed:"seed" , width:"width" , height:"height" }
|
| 27 |
print(result)
|
| 28 |
try:
|
| 29 |
language = detect(prompt)
|
|
@@ -41,7 +41,7 @@ def query(prompt, negative_prompt, task, steps=35, sampler="DPM++ 2M Karras", cf
|
|
| 41 |
seed = int(seed)
|
| 42 |
width = int(width)
|
| 43 |
height = int(height)
|
| 44 |
-
style_name= int(style_name)
|
| 45 |
progress=gr.Progress(track_tqdm=True)
|
| 46 |
|
| 47 |
if task == "Playground v2":
|
|
|
|
| 22 |
app = FastAPI()
|
| 23 |
@app.get("/")
|
| 24 |
|
| 25 |
+
def query(prompt, negative_prompt, task, steps=35, sampler="DPM++ 2M Karras", cfg_scale=7, seed=-1, style_name, width=896, height=1152):
|
| 26 |
+
result = {prompt:"prompt", negative_prompt:"negative_prompt", task:"task", steps:"steps", sampler:"sampler", cfg_scale:"cfg_scale", seed:"seed" , style_name:"style_name", width:"width" , height:"height" }
|
| 27 |
print(result)
|
| 28 |
try:
|
| 29 |
language = detect(prompt)
|
|
|
|
| 41 |
seed = int(seed)
|
| 42 |
width = int(width)
|
| 43 |
height = int(height)
|
| 44 |
+
style_name = int(style_name)
|
| 45 |
progress=gr.Progress(track_tqdm=True)
|
| 46 |
|
| 47 |
if task == "Playground v2":
|