File size: 1,924 Bytes
ec01991
 
 
 
 
 
 
 
 
 
9086f73
 
 
 
 
 
 
 
1347859
 
 
9086f73
1347859
 
9086f73
 
 
 
 
 
 
 
 
 
 
 
 
 
1347859
0f6bee9
 
 
 
 
 
 
 
9086f73
 
0f6bee9
 
 
 
 
 
 
 
 
 
 
 
8f52987
9086f73
0f6bee9
9086f73
0f6bee9
9086f73
 
0f6bee9
9086f73
0f6bee9
9086f73
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
title: Qwen25 Api
emoji: πŸŒ–
colorFrom: green
colorTo: green
sdk: docker
pinned: false
license: apache-2.0
---

## run locally
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

1. ensure you have docker installed
2. then run the docker image
3. test it via endpoints below

```
curl -X GET "http://localhost:8000/predict?image_url=https://example.com/sample-image.jpg&prompt=Describe%20the%20contents%20of%20this%20image." -H "accept: application/json"

curl -X GET "http://localhost:8000/chat?prompt=Hello%20there%2C%20how%20are%20you%3F" -H "accept: application/json"
```


## run after deploy

1. qwen2.5vl - text prompt with image

2. qwen2.5 - text prompt

3. llama3 uncensored - text prompt



curl -G "https://<hf-username>-<hf-space-api>.hf.space/<your-python-api-path>" \
     --data-urlencode "image_url=<url-to-some-image.jpg>" \
     --data-urlencode "prompt=Describe this image."




curl -G "https://lseanlon-qwen25-api.hf.space/predict" \
     --data-urlencode "image_url=https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg" \
     --data-urlencode "prompt=Describe this image."


      
### my personal example
```

curl -G "https://lseanlon-qwen25-api.hf.space/" \
     --data-urlencode "image_url=https://huggingface.co/front/assets/huggingface_logo-noborder.svg" \
     --data-urlencode "prompt=Describe this image."


curl -G "https://lseanlon-qwen25-api.hf.space/predict" \
     --data-urlencode "image_url=https://images.all-free-download.com/images/thumbjpg/cat_hangover_relax_213869.jpg" \
     --data-urlencode "prompt=Describe this image."

 

curl -G "https://lseanlon-qwen25-api.hf.space/chat" \
     --data-urlencode "prompt=write controversial why the sky blue?"

      

curl -G "https://lseanlon-qwen25-api.hf.space/llama_chat" \
     --data-urlencode "prompt=write controversial why the sky blue?"

            

```