Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -44,10 +44,10 @@ def main():
|
|
44 |
uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
|
45 |
|
46 |
# load the image
|
47 |
-
|
48 |
|
49 |
# context as prompt
|
50 |
-
prompt = generate_captions(
|
51 |
st.write("The Context is:", prompt)
|
52 |
|
53 |
# display the image
|
|
|
44 |
uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
|
45 |
|
46 |
# load the image
|
47 |
+
img = Image.open(uploaded_file).convert("RGB")
|
48 |
|
49 |
# context as prompt
|
50 |
+
prompt = generate_captions(img)
|
51 |
st.write("The Context is:", prompt)
|
52 |
|
53 |
# display the image
|