fluffyvision / app.py
Jonas
v1 HF
ad13c6f
raw history blame
No virus
734 Bytes
import gradio as gr
import predictLLaVa
image = gr.Image(sources=["upload", "webcam"], label="Image", type="pil")
inputText = gr.Textbox(lines=1, label="English Instruction:")
languageDropdown = gr.Dropdown(
choices=["en", "de", "fr", "es", "it", "nl", "ru"],
label="Output in:",
multiselect=False,
value="en"
)
gr.Interface(
fn=predictLLaVa.process_single_image,
inputs=[inputText, image, languageDropdown],
outputs=gr.Textbox(label="Generated Description"),
title="Fluffyvision",
description="Generate a text description of an image based on an instruction.",
allow_flagging="never"
).launch(share=True, auth=predictLLaVa.check_auth, auth_message="Please enter your username and password.")