|
Download README.md from allvasc/prolinsia: direct link, hf CLI and curl.
- Browser
- Download file 521 Bytes
-
https://huggingface.co/allvasc/prolinsia/resolve/main/README.md
- Command line
-
hf download hf://allvasc/prolinsia/README.md
-
curl -L -o README.md https://huggingface.co/allvasc/prolinsia/resolve/main/README.md
521 Bytes
| import gradio as gr | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-VL", device_map="auto", trust_remote_code=True) | |
| tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-VL", trust_remote_code=True) | |
| def analyze_image(image, prompt): | |
| response = model.chat(tokenizer, query=prompt, image=image) | |
| return response | |
| gr.Interface( | |
| fn=analyze_image, | |
| inputs=[gr.Image(type="filepath"), gr.Textbox(label="Prompt")], | |
| outputs="text" | |
| ).launch() |