Spaces:
Sleeping
Sleeping
Update main.py
Browse files172 unmodified lines173174175176177178179180181182183184172 unmodified lines@app.post("/Immagine")def generate_image(request: Request, input_data: InputImage):client = Client("https://openskyml-fast-sdxl-stable-diffusion-xl.hf.space/--replicas/545b5tw7n/")if input_data.style:if input_data.style in style_image:style_info = style_image[input_data.style]input_data.input = style_info["descrizione"].format(prompt=input_data.input)input_data.negativePrompt = style_info["negativePrompt"]max_attempts = 20attempt = 0while attempt < max_attempts:172 unmodified lines173174175176177178179180181182183184185186172 unmodified lines@app.post("/Immagine")def generate_image(request: Request, input_data: InputImage):client = Client("https://openskyml-fast-sdxl-stable-diffusion-xl.hf.space/--replicas/545b5tw7n/")if input_data.style:print(input_data.style)if input_data.style in style_image:style_info = style_image[input_data.style]input_data.input = style_info["descrizione"].format(prompt=input_data.input)input_data.negativePrompt = style_info["negativePrompt"]print(input_data.input)max_attempts = 20attempt = 0while attempt < max_attempts:
main.py+3-1