Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,11 +4,14 @@
|
|
| 4 |
import base64
|
| 5 |
import gradio as gr
|
| 6 |
from huggingface_hub import InferenceClient
|
| 7 |
-
from transformers import
|
| 8 |
import torch
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
def chat(input_text, history=[]):
|
| 14 |
history.append(input_text)
|
|
|
|
| 4 |
import base64
|
| 5 |
import gradio as gr
|
| 6 |
from huggingface_hub import InferenceClient
|
| 7 |
+
from transformers import pipeline
|
| 8 |
import torch
|
| 9 |
|
| 10 |
+
messages = [
|
| 11 |
+
{"role": "user", "content": "Who are you?"},
|
| 12 |
+
]
|
| 13 |
+
pipe = pipeline("image-text-to-text", model="Qwen/Qwen2.5-VL-3B-Instruct")
|
| 14 |
+
pipe(messages)
|
| 15 |
|
| 16 |
def chat(input_text, history=[]):
|
| 17 |
history.append(input_text)
|