SandraCLV's picture
Update app.py
be8da16
raw
history blame
749 Bytes
import gradio as gr
from transformers import pipeline,WhisperProcessor, WhisperForConditionalGeneration
import torch
import librosa
checkpoint = "openai/whisper-base"
# checkpoint = "/innev/open-ai/huggingface/openai/whisper-base"
processor = WhisperProcessor.from_pretrained(checkpoint)
model = WhisperForConditionalGeneration.from_pretrained(checkpoint)
text_Interface=gr.Interface.load("models/nlpconnect/vit-gpt2-image-captioning")
def greet():
return "Hello "
with gr.Blocks() as demo:
gr.Markdown("Start typing below and then click **Run** to see the output.")
with gr.Row():
inp = gr.Image(type='pil')
out = gr.Textbox()
gr.Interface(fn=greet, inputs=inp, outputs=out)
demo.launch()
text_Interface.launch()