Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,16 +23,15 @@ st.markdown(
|
|
| 23 |
align-items: center;
|
| 24 |
justify-content: center;
|
| 25 |
}
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
| 28 |
}
|
| 29 |
h1, h2, h3 {
|
| 30 |
text-align: center;
|
| 31 |
}
|
| 32 |
-
.uploaded-image {
|
| 33 |
-
border-radius: 10px;
|
| 34 |
-
margin-bottom: 20px;
|
| 35 |
-
}
|
| 36 |
</style>
|
| 37 |
""",
|
| 38 |
unsafe_allow_html=True
|
|
@@ -47,7 +46,7 @@ uploaded_file = st.file_uploader("Upload an image", type=["jpg", "png", "jpeg"])
|
|
| 47 |
|
| 48 |
if uploaded_file is not None:
|
| 49 |
# Display the uploaded image
|
| 50 |
-
st.image(uploaded_file, caption="Uploaded Image", use_container_width=True
|
| 51 |
|
| 52 |
# Generate button
|
| 53 |
if st.button("Generate Prompt"):
|
|
@@ -78,6 +77,7 @@ if uploaded_file is not None:
|
|
| 78 |
st.text_area("", generated_prompt, height=200)
|
| 79 |
|
| 80 |
# Copy button
|
| 81 |
-
st.button("Copy Prompt"
|
|
|
|
| 82 |
else:
|
| 83 |
st.error(f"Failed to generate prompt: {response.status_code} - {response.text}")
|
|
|
|
| 23 |
align-items: center;
|
| 24 |
justify-content: center;
|
| 25 |
}
|
| 26 |
+
img {
|
| 27 |
+
border-radius: 10px;
|
| 28 |
+
margin-bottom: 20px;
|
| 29 |
+
max-width: 100%;
|
| 30 |
+
height: auto;
|
| 31 |
}
|
| 32 |
h1, h2, h3 {
|
| 33 |
text-align: center;
|
| 34 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
</style>
|
| 36 |
""",
|
| 37 |
unsafe_allow_html=True
|
|
|
|
| 46 |
|
| 47 |
if uploaded_file is not None:
|
| 48 |
# Display the uploaded image
|
| 49 |
+
st.image(uploaded_file, caption="Uploaded Image", use_container_width=True)
|
| 50 |
|
| 51 |
# Generate button
|
| 52 |
if st.button("Generate Prompt"):
|
|
|
|
| 77 |
st.text_area("", generated_prompt, height=200)
|
| 78 |
|
| 79 |
# Copy button
|
| 80 |
+
if st.button("Copy Prompt"):
|
| 81 |
+
st.write("Copy functionality is not supported in this environment. Please manually copy the text.")
|
| 82 |
else:
|
| 83 |
st.error(f"Failed to generate prompt: {response.status_code} - {response.text}")
|