Spaces:
Sleeping
Sleeping
File size: 749 Bytes
1a7973f 5eb99ac ec574b7 5eb99ac 415ea49 fac92f6 be8da16 d6da658 be8da16 1a7973f 415ea49 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
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() |