LiquidoNoNewtoniano commited on
Commit
c6f74a4
1 Parent(s): 562fea2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
  from transformers import pipeline
 
 
3
 
4
- pipe = pipeline("image-to-text", model="nlpconnect/vit-gpt2-image-captioning")
5
-
6
- demo = gr.Interface( fn=image-to-text, inputs="image", outputs="text" )
7
  demo.launch()
 
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
+ demo = gr.Interface( fn=model1, inputs="image", outputs="text" )
 
 
7
  demo.launch()