Spaces:
Sleeping
Sleeping
LiquidoNoNewtoniano
commited on
Commit
•
74c9918
1
Parent(s):
c6f74a4
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
-
from transformers import pipeline
|
3 |
-
def model1():
|
4 |
-
pipe = pipeline("image-to-text", model="nlpconnect/vit-gpt2-image-captioning")
|
5 |
|
6 |
-
|
|
|
|
|
|
|
7 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
2 |
|
3 |
+
|
4 |
+
image_to_text = gr.Interface.load("models/nlpconnect/vit-gpt2-image-captioning")
|
5 |
+
|
6 |
+
demo = gr.Interface(image_to_text, inputs="image", outputs="text" )
|
7 |
demo.launch()
|