Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
classifier = pipeline("image-to-text", model="vit-gpt2-image-captioning")
|
5 |
def main():
|
6 |
st.title("image-to-text")
|
7 |
|
8 |
-
with st.form("
|
9 |
image = st.file_uploader('Choose a file')
|
10 |
# clicked==True only when the button is clicked
|
11 |
clicked = st.form_submit_button("Submit")
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
classifier = pipeline("image-to-text", model="nlpconnect/vit-gpt2-image-captioning")
|
5 |
def main():
|
6 |
st.title("image-to-text")
|
7 |
|
8 |
+
with st.form("image"):
|
9 |
image = st.file_uploader('Choose a file')
|
10 |
# clicked==True only when the button is clicked
|
11 |
clicked = st.form_submit_button("Submit")
|