the-future-dev commited on
Commit
b688905
1 Parent(s): 7a4c41f

first commit

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,10 +11,10 @@ if uploaded_file is not None:
11
  image = Image.open(uploaded_file)
12
  st.image(image, caption='Uploaded Image.', use_column_width=True)
13
  st.write("")
14
- prompt = st.text_input(f"Detect the main object in the image. The image is a")
15
- num_characters = st.chat_input("20")
16
  num_characters = int(num_characters)
17
- if st.button('Classify'):
18
  st.write(f"User: {prompt}")
19
  with st.spinner('Processing...'):
20
  label = kosmos.single_image_classification(image, prompt, num_characters)
 
11
  image = Image.open(uploaded_file)
12
  st.image(image, caption='Uploaded Image.', use_column_width=True)
13
  st.write("")
14
+ num_characters = st.text_input("Number of characters", "20")
15
+ prompt = st.chat_input("Detect the main object in the image. The image is a")
16
  num_characters = int(num_characters)
17
+ if prompt:
18
  st.write(f"User: {prompt}")
19
  with st.spinner('Processing...'):
20
  label = kosmos.single_image_classification(image, prompt, num_characters)