stchakman commited on
Commit
d9585d8
1 Parent(s): 3034b25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- # pipe = pipe.to("cuda")
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.split(':')[0]}")
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}"):