Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ def generate_image(prompt):
|
|
61 |
with st.spinner("Generating image..."):
|
62 |
pipe = StableDiffusionPipeline.from_pretrained(model_id)
|
63 |
# If you have a GPU available, uncomment the following line
|
64 |
-
|
65 |
image = pipe(prompt).images[0]
|
66 |
return image
|
67 |
|
@@ -87,7 +87,7 @@ if uploaded_file is not None:
|
|
87 |
if len(suggested_dishes) > 0:
|
88 |
st.write("Suggested dishes based on the ingredients:")
|
89 |
for idx, dish in enumerate(suggested_dishes):
|
90 |
-
st.write(f"{idx + 1}. {dish
|
91 |
|
92 |
for idx, dish in enumerate(suggested_dishes[:3]):
|
93 |
if st.button(f"Generate Image for Dish {idx + 1}"):
|
|
|
61 |
with st.spinner("Generating image..."):
|
62 |
pipe = StableDiffusionPipeline.from_pretrained(model_id)
|
63 |
# If you have a GPU available, uncomment the following line
|
64 |
+
pipe = pipe.to("cuda")
|
65 |
image = pipe(prompt).images[0]
|
66 |
return image
|
67 |
|
|
|
87 |
if len(suggested_dishes) > 0:
|
88 |
st.write("Suggested dishes based on the ingredients:")
|
89 |
for idx, dish in enumerate(suggested_dishes):
|
90 |
+
st.write(f"{idx + 1}. {dish}")
|
91 |
|
92 |
for idx, dish in enumerate(suggested_dishes[:3]):
|
93 |
if st.button(f"Generate Image for Dish {idx + 1}"):
|