Spaces:
Runtime error
Runtime error
the-future-dev
commited on
Commit
•
b688905
1
Parent(s):
7a4c41f
first commit
Browse files
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 |
-
|
15 |
-
|
16 |
num_characters = int(num_characters)
|
17 |
-
if
|
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)
|