Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,8 +26,9 @@ def main():
|
|
26 |
text_input = st.text_input("Enter the text:")
|
27 |
if st.button("Generate Story and Image") and text_input:
|
28 |
#generate_image(text_input)
|
|
|
29 |
st.success(f'Generated Caption: {text_input}')
|
30 |
-
|
31 |
|
32 |
|
33 |
# Input URL
|
@@ -36,8 +37,9 @@ def main():
|
|
36 |
if st.button("Generate Story and Image") and image_url:
|
37 |
image_text = image_to_text_from_url(image_url)
|
38 |
#generate_image(image_text)
|
|
|
39 |
st.success(f'Generated Caption: {image_text}')
|
40 |
-
|
41 |
|
42 |
|
43 |
def image_to_text_from_file(uploaded_file):
|
|
|
26 |
text_input = st.text_input("Enter the text:")
|
27 |
if st.button("Generate Story and Image") and text_input:
|
28 |
#generate_image(text_input)
|
29 |
+
generated_text = generate_mask_from_result(text_input)
|
30 |
st.success(f'Generated Caption: {text_input}')
|
31 |
+
st.success(f'Generated Text: {generated_text}')
|
32 |
|
33 |
|
34 |
# Input URL
|
|
|
37 |
if st.button("Generate Story and Image") and image_url:
|
38 |
image_text = image_to_text_from_url(image_url)
|
39 |
#generate_image(image_text)
|
40 |
+
generated_text = generate_mask_from_result(image_text)
|
41 |
st.success(f'Generated Caption: {image_text}')
|
42 |
+
st.success(f'Generated Text: {generated_text}')
|
43 |
|
44 |
|
45 |
def image_to_text_from_file(uploaded_file):
|