Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
import gradio as gr
|
2 |
|
3 |
-
|
4 |
-
return "Hello " + name + "!"
|
5 |
|
6 |
-
|
7 |
|
8 |
-
|
|
|
|
|
|
|
|
1 |
|
2 |
+
from transformers import pipeline
|
|
|
3 |
|
4 |
+
image_to_text = pipeline("image-to-text", model="nlpconnect/vit-gpt2-image-captioning")
|
5 |
|
6 |
+
image_to_text("https://ankur3107.github.io/assets/images/image-captioning-example.png")
|
7 |
+
|
8 |
+
# [{'generated_text': 'a soccer game with a player jumping to catch the ball '}]
|