sms07 commited on
Commit
6fdea95
·
verified ·
1 Parent(s): 8894135

creating app

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+ import streamlit as st
3
+
4
+ pipe = pipeline("image-to-text", model="nlpconnect/vit-gpt2-image-captioning")
5
+
6
+ url = st.text_area("enter image address:")
7
+
8
+ if url:
9
+ out = pipe(url)
10
+ st.json(out)