Spaces:
Runtime error
Runtime error
potentially breaking advanced options
Browse files
app.py
CHANGED
@@ -97,10 +97,11 @@ cap_prompt = st.sidebar.text_input(
|
|
97 |
|
98 |
_ = st.sidebar.button("Regenerate Caption")
|
99 |
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
|
|
104 |
|
105 |
if uploaded_image is None and submitted:
|
106 |
st.write("Please select a file to upload")
|
@@ -128,7 +129,8 @@ else:
|
|
128 |
show = st.image(show_image)
|
129 |
show.image(show_image, "Your Image")
|
130 |
|
131 |
-
|
|
|
132 |
|
133 |
# from model import *
|
134 |
# sample_images = get_samples()
|
|
|
97 |
|
98 |
_ = st.sidebar.button("Regenerate Caption")
|
99 |
|
100 |
+
advanced = st.sidebar.checkbox("Advanced Options")
|
101 |
+
num_captions=1
|
102 |
+
if advanced:
|
103 |
+
nuc_size = st.sidebar.slider("Nucelus Size:", min_value=0.0, max_value=1.0, value=0.8, step=0.05)
|
104 |
+
num_captions = st.sidebar.slider("Number of Captions to Predict", options=[1,2,3,4,5], value=1)
|
105 |
|
106 |
if uploaded_image is None and submitted:
|
107 |
st.write("Please select a file to upload")
|
|
|
129 |
show = st.image(show_image)
|
130 |
show.image(show_image, "Your Image")
|
131 |
|
132 |
+
for i in range(num_captions):
|
133 |
+
gen_show_caption(sub, imageLoader.text_transform(cap_prompt))
|
134 |
|
135 |
# from model import *
|
136 |
# sample_images = get_samples()
|