Spaces:
Sleeping
Sleeping
added code for dalle
Browse files
app.py
CHANGED
@@ -1,4 +1,21 @@
|
|
|
|
1 |
import streamlit as st
|
|
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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)
|