SandraCLV commited on
Commit
be8da16
·
1 Parent(s): 415ea49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -9,11 +9,15 @@ processor = WhisperProcessor.from_pretrained(checkpoint)
9
  model = WhisperForConditionalGeneration.from_pretrained(checkpoint)
10
  text_Interface=gr.Interface.load("models/nlpconnect/vit-gpt2-image-captioning")
11
 
12
- def greet(name):
13
- return "Hello " + name
14
 
15
-
16
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
 
 
 
 
17
 
18
  demo.launch()
19
  text_Interface.launch()
 
9
  model = WhisperForConditionalGeneration.from_pretrained(checkpoint)
10
  text_Interface=gr.Interface.load("models/nlpconnect/vit-gpt2-image-captioning")
11
 
12
+ def greet():
13
+ return "Hello "
14
 
15
+ with gr.Blocks() as demo:
16
+ gr.Markdown("Start typing below and then click **Run** to see the output.")
17
+ with gr.Row():
18
+ inp = gr.Image(type='pil')
19
+ out = gr.Textbox()
20
+ gr.Interface(fn=greet, inputs=inp, outputs=out)
21
 
22
  demo.launch()
23
  text_Interface.launch()