Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Qwen3-VL API Demo
|
| 3 |
+
emoji: 🤖
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# Qwen3-VL Flask API Deployment
|
| 11 |
+
|
| 12 |
+
This project implements the Qwen3-VL model in a Flask server, providing a callable API for both vision-text and text-only inference.
|
| 13 |
+
|
| 14 |
+
## Setup
|
| 15 |
+
|
| 16 |
+
This Space is built using a custom `Dockerfile`. The server runs on port 7860.
|
| 17 |
+
|
| 18 |
+
## API Endpoints
|
| 19 |
+
|
| 20 |
+
The primary purpose of this deployment is to provide callable API endpoints.
|
| 21 |
+
|
| 22 |
+
### 1. Vision + Text Inference
|
| 23 |
+
|
| 24 |
+
**Endpoint:** `POST /inference`
|
| 25 |
+
|
| 26 |
+
This endpoint accepts `multipart/form-data` containing an image and a prompt.
|
| 27 |
+
|
| 28 |
+
**Example (using Python `requests`):**
|
| 29 |
+
|
| 30 |
+
```python
|
| 31 |
+
import requests
|
| 32 |
+
|
| 33 |
+
# Replace with your public HF Space URL
|
| 34 |
+
url = "https://[YOUR-SPACE-NAME].hf.space/inference"
|
| 35 |
+
|
| 36 |
+
files = {'image': open('path/to/your/image.jpg', 'rb')}
|
| 37 |
+
data = {'prompt': 'Describe this image in detail.'}
|
| 38 |
+
|
| 39 |
+
response = requests.post(url, files=files, data=data)
|
| 40 |
+
print(response.json())
|