chanicpanic commited on
Commit
4dee1d9
·
1 Parent(s): 5f26241

Make switching between modalities a bit smoother

Browse files
Files changed (1) hide show
  1. search.py +19 -18
search.py CHANGED
@@ -53,24 +53,25 @@ def write_grascii_search():
53
  max_chars=MAX_GRASCII_LENGTH,
54
  )
55
  else:
56
- image_data = placeholder.file_uploader(
57
- "Image",
58
- type=["png", "jpg"],
59
- help="""
60
- Upload an image of a shorthand form.
61
-
62
- At this time, minimal preprocessing is performed on images
63
- before running them through the model. For best results,
64
- upload an image:
65
-
66
- - of a closely cropped, single shorthand form
67
- - with the shorthand written in black on a white background
68
- - that does not contain marks beside the shorthand form
69
- """,
70
- )
71
- save = st.checkbox(
72
- "Save images I upload for potential inclusion in open-source datasets used to train and improve models"
73
- )
 
74
 
75
  if image_data:
76
  image = Image.open(image_data).convert("RGBA")
 
53
  max_chars=MAX_GRASCII_LENGTH,
54
  )
55
  else:
56
+ with placeholder.container():
57
+ image_data = st.file_uploader(
58
+ "Image",
59
+ type=["png", "jpg"],
60
+ help="""
61
+ Upload an image of a shorthand form.
62
+
63
+ At this time, minimal preprocessing is performed on images
64
+ before running them through the model. For best results,
65
+ upload an image:
66
+
67
+ - of a closely cropped, single shorthand form
68
+ - with the shorthand written in black on a white background
69
+ - that does not contain marks beside the shorthand form
70
+ """,
71
+ )
72
+ save = st.checkbox(
73
+ "Save images I upload for potential inclusion in open-source datasets used to train and improve models"
74
+ )
75
 
76
  if image_data:
77
  image = Image.open(image_data).convert("RGBA")