Voffchik commited on
Commit
e7326f0
·
verified ·
1 Parent(s): a67780f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -22,7 +22,7 @@ class ImageRequest(BaseModel): # Новая модель для запроса
22
  is_public: bool = False
23
 
24
  @app.post("/generate-image")
25
- async def generate_image(request: ImageRequest):
26
 
27
 
28
 
@@ -30,7 +30,7 @@ async def generate_image(request: ImageRequest):
30
  try:
31
  pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell")
32
 
33
- prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
34
  image = pipe(prompt).images[0]
35
 
36
  return image
 
22
  is_public: bool = False
23
 
24
  @app.post("/generate-image")
25
+ async def generate_image(request: GenerationRequest):
26
 
27
 
28
 
 
30
  try:
31
  pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell")
32
 
33
+ prompt = request.prompt
34
  image = pipe(prompt).images[0]
35
 
36
  return image