LordFarquaad42 commited on
Commit
83f13b7
·
verified ·
1 Parent(s): 4327ac5

added code for dalle

Browse files
Files changed (1) hide show
  1. app.py +19 -2
app.py CHANGED
@@ -1,4 +1,21 @@
 
1
  import streamlit as st
 
2
 
3
- x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Python
2
  import streamlit as st
3
+ from PIL import Image
4
 
5
+ # Function to load and display image
6
+ def display_image(image_path):
7
+ image = Image.open(image_path)
8
+ st.image(image, use_column_width=True)
9
+
10
+ st.title('Generate Your Image!')
11
+ prompt = st.text_input('Enter a prompt')
12
+
13
+ if prompt: # prompt dalle
14
+
15
+ if images: #display images
16
+
17
+ image_path1 = 'path_to_image1_based_on_prompt' # Replace with actual logic
18
+ image_path2 = 'path_to_image2_based_on_prompt' # Replace with actual logic
19
+
20
+ display_image(image_path1)
21
+ display_image(image_path2)