Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,16 @@ from huggingface_hub import InferenceClient
|
|
| 5 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
| 6 |
"""
|
| 7 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
|
|
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
def respond(
|
| 11 |
message,
|
|
|
|
| 5 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
| 6 |
"""
|
| 7 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
| 8 |
+
client = InferenceClient("Qwen/Qwen2.5-VL-3B-Instruct")
|
| 9 |
|
| 10 |
+
# Use a pipeline as a high-level helper
|
| 11 |
+
from transformers import pipeline
|
| 12 |
+
|
| 13 |
+
messages = [
|
| 14 |
+
{"role": "user", "content": "Who are you?"},
|
| 15 |
+
]
|
| 16 |
+
pipe = pipeline("image-text-to-text", model="Qwen/Qwen2.5-VL-7B-Instruct")
|
| 17 |
+
pipe(messages)
|
| 18 |
|
| 19 |
def respond(
|
| 20 |
message,
|