Spaces:
Runtime error
Runtime error
Commit ·
365c02c
1
Parent(s): 3ce1a28
app.py
CHANGED
|
@@ -28,12 +28,12 @@ descriptions = json.load(open('valid_list.json', 'r'))
|
|
| 28 |
|
| 29 |
|
| 30 |
example = int()
|
|
|
|
| 31 |
example_idx = int(col1.number_input('Sample an example from the validation set', value=0, min_value=0, max_value=len(descriptions)-1, on_change=set_back))
|
| 32 |
img_set, idx, descr = descriptions[example_idx]
|
| 33 |
idx = int(idx)
|
| 34 |
images = [prefix+'/'+img_set+'/'+i for i in set2ids[img_set]]
|
| 35 |
img_urls = images.copy()
|
| 36 |
-
index = int(col2.number_input('Image Index from 0 to 9', value=0, min_value=0, max_value=len(images)-1))
|
| 37 |
|
| 38 |
col1.markdown(f'**Description**:')
|
| 39 |
col1.markdown(descr)
|
|
|
|
| 28 |
|
| 29 |
|
| 30 |
example = int()
|
| 31 |
+
index = int(col2.number_input('Image Index from 0 to 9', value=0, min_value=0, max_value=9))
|
| 32 |
example_idx = int(col1.number_input('Sample an example from the validation set', value=0, min_value=0, max_value=len(descriptions)-1, on_change=set_back))
|
| 33 |
img_set, idx, descr = descriptions[example_idx]
|
| 34 |
idx = int(idx)
|
| 35 |
images = [prefix+'/'+img_set+'/'+i for i in set2ids[img_set]]
|
| 36 |
img_urls = images.copy()
|
|
|
|
| 37 |
|
| 38 |
col1.markdown(f'**Description**:')
|
| 39 |
col1.markdown(descr)
|