Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
@@ -173,12 +173,14 @@ class InputImage(BaseModel):
|
|
173 |
@app.post("/Immagine")
|
174 |
def generate_image(request: Request, input_data: InputImage):
|
175 |
client = Client("https://openskyml-fast-sdxl-stable-diffusion-xl.hf.space/--replicas/545b5tw7n/")
|
|
|
176 |
if input_data.style:
|
|
|
177 |
if input_data.style in style_image:
|
178 |
style_info = style_image[input_data.style]
|
179 |
input_data.input = style_info["descrizione"].format(prompt=input_data.input)
|
180 |
input_data.negativePrompt = style_info["negativePrompt"]
|
181 |
-
|
182 |
max_attempts = 20
|
183 |
attempt = 0
|
184 |
while attempt < max_attempts:
|
|
|
173 |
@app.post("/Immagine")
|
174 |
def generate_image(request: Request, input_data: InputImage):
|
175 |
client = Client("https://openskyml-fast-sdxl-stable-diffusion-xl.hf.space/--replicas/545b5tw7n/")
|
176 |
+
|
177 |
if input_data.style:
|
178 |
+
print(input_data.style)
|
179 |
if input_data.style in style_image:
|
180 |
style_info = style_image[input_data.style]
|
181 |
input_data.input = style_info["descrizione"].format(prompt=input_data.input)
|
182 |
input_data.negativePrompt = style_info["negativePrompt"]
|
183 |
+
print(input_data.input)
|
184 |
max_attempts = 20
|
185 |
attempt = 0
|
186 |
while attempt < max_attempts:
|