minicode / app.py
Yixin1234's picture
Deploy DeepSeek-VL QA app
5a73fa0
raw
history blame
687 Bytes
import gradio as gr
from deepseek_vl import DeepSeekVL
# Initialize DeepSeek-VL model (CPU for free Spaces)
model = DeepSeekVL(model_path="deepseek-ai/deepseek-vl-7b", device="cpu")
def qa(image, question):
# Run DeepSeek-VL inference: image + question -> answer
return model.generate(image, question)
demo = gr.Interface(
fn=qa,
inputs=[
gr.Image(type="pil", label="Upload Image"),
gr.Textbox(label="Enter your question")
],
outputs="text",
title="DeepSeek-VL Multimodal QA Demo",
description="Upload an image and enter a question. Experience DeepSeek-VL's vision-language capabilities."
)
if __name__ == "__main__":
demo.launch()