Spaces:
Sleeping
Sleeping
Update app.py
#2
by sarahlovestheoutdoors - opened
app.py
CHANGED
|
@@ -19,9 +19,8 @@ pipeline = AutoPipelineForText2Image.from_pretrained(
|
|
| 19 |
def read_root():
|
| 20 |
return {"Hello": "World!"}
|
| 21 |
|
| 22 |
-
@app.get('/image')
|
| 23 |
-
def generate_image(
|
| 24 |
-
prompt = query
|
| 25 |
print(prompt)
|
| 26 |
|
| 27 |
image = pipeline(prompt=prompt, num_inference_steps=10).images[0]
|
|
|
|
| 19 |
def read_root():
|
| 20 |
return {"Hello": "World!"}
|
| 21 |
|
| 22 |
+
@app.get('/image/{prompt}')
|
| 23 |
+
def generate_image(prompt):
|
|
|
|
| 24 |
print(prompt)
|
| 25 |
|
| 26 |
image = pipeline(prompt=prompt, num_inference_steps=10).images[0]
|