Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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(
|
| 13 |
-
return "Hello "
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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()
|