Spaces:
Runtime error
Runtime error
Commit ·
56538f9
1
Parent(s): 9373f8f
Update layout
Browse files
app.py
CHANGED
|
@@ -117,10 +117,7 @@ if state.image_file is None:
|
|
| 117 |
image = plt.imread(image_path)
|
| 118 |
state.image = image
|
| 119 |
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
if new_col1.button("Get a random example", help="Get a random example from one of the seeded examples."):
|
| 124 |
sample = dummy_data.sample(1).reset_index()
|
| 125 |
state.image_file = sample.loc[0, "image_file"]
|
| 126 |
state.caption = sample.loc[0, "caption"].strip("- ")
|
|
@@ -132,6 +129,8 @@ if new_col1.button("Get a random example", help="Get a random example from one o
|
|
| 132 |
|
| 133 |
transformed_image = get_transformed_image(state.image)
|
| 134 |
|
|
|
|
|
|
|
| 135 |
# Display Image
|
| 136 |
new_col1.image(state.image, use_column_width="always")
|
| 137 |
# Display Reference Caption
|
|
|
|
| 117 |
image = plt.imread(image_path)
|
| 118 |
state.image = image
|
| 119 |
|
| 120 |
+
if st.button("Get a random example", help="Get a random example from one of the seeded examples."):
|
|
|
|
|
|
|
|
|
|
| 121 |
sample = dummy_data.sample(1).reset_index()
|
| 122 |
state.image_file = sample.loc[0, "image_file"]
|
| 123 |
state.caption = sample.loc[0, "caption"].strip("- ")
|
|
|
|
| 129 |
|
| 130 |
transformed_image = get_transformed_image(state.image)
|
| 131 |
|
| 132 |
+
new_col1, new_col2 = st.beta_columns([5,5])
|
| 133 |
+
|
| 134 |
# Display Image
|
| 135 |
new_col1.image(state.image, use_column_width="always")
|
| 136 |
# Display Reference Caption
|