Kvikontent commited on
Commit
36e845c
1 Parent(s): 92951a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -8
app.py CHANGED
@@ -4,13 +4,10 @@ from PIL import Image
4
  from io import BytesIO
5
  import os
6
  import requests
7
- from diffusers import DiffusionPipeline
8
 
9
  st.sidebar.title("Stable Diffusion SDXL-Turbo", help="Made with API")
10
  st.sidebar.subheader("By KVI Kontent")
11
  st.sidebar.write("Choose model and enter prompt")
12
- pipeline = DiffusionPipeline.from_pretrained("stablediffusionapi/juggernaut-xl-v5")
13
- pipeline.load_lora_weights("openskyml/dalle-3-xl")
14
 
15
  model = st.sidebar.selectbox("Choose Model", ("prodia", "pollinations", "Dall-e 3"))
16
 
@@ -22,8 +19,4 @@ if model == "prodia" or model == "pollinations":
22
  image = Image.open(BytesIO(resp))
23
  st.image(image, caption="Generated Image")
24
  except Exception as e:
25
- st.error(str(e))
26
- elif model == "Dall-e 3":
27
- image_bytes = pipeline(prompt)
28
- image = Image.open(BytesIO(image_bytes))
29
- st.image(image, caption="Generated Image")
 
4
  from io import BytesIO
5
  import os
6
  import requests
 
7
 
8
  st.sidebar.title("Stable Diffusion SDXL-Turbo", help="Made with API")
9
  st.sidebar.subheader("By KVI Kontent")
10
  st.sidebar.write("Choose model and enter prompt")
 
 
11
 
12
  model = st.sidebar.selectbox("Choose Model", ("prodia", "pollinations", "Dall-e 3"))
13
 
 
19
  image = Image.open(BytesIO(resp))
20
  st.image(image, caption="Generated Image")
21
  except Exception as e:
22
+ st.error(str(e))