cool-api / app.py
preston-cell's picture
Update app.py
b0a32d3 verified
raw
history blame
398 Bytes
import gradio as gr
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("document-question-answering", model="Or4cl3-1/multimodal-fusion-optimized")
def launch(input):
out = pipe(input)
return out[0]['generated_text']
iface = gr.Interface(launch,
inputs=gr.Image(type='pil'),
outputs="text")
iface.launch()