Spaces:
Sleeping
Sleeping
creating app
Browse files
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)
|