LordFarquaad42 commited on
Commit
637bad0
·
verified ·
1 Parent(s): ac9bad5

fixed uploading on load

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -21,5 +21,7 @@ prompt = st.text_input("Enter a prompt:", "batman hitting the griddy in gotham")
21
  image_bytes = query({
22
  "inputs": prompt,
23
  })
24
- # You can access the image with PIL.Image for example
25
- image = Image.open(io.BytesIO(image_bytes))
 
 
 
21
  image_bytes = query({
22
  "inputs": prompt,
23
  })
24
+
25
+ if(image_bytes):
26
+ image = Image.open(io.BytesIO(image_bytes))
27
+ st.image(image, caption="Image generated by the model", use_column_width=True)