Spaces:
Running
on
Zero
Running
on
Zero
feat: add hf space.
Browse files- demo.py → app.py +2 -1
demo.py → app.py
RENAMED
|
@@ -6,6 +6,7 @@ from transformers import (
|
|
| 6 |
from PIL import Image
|
| 7 |
from threading import Thread
|
| 8 |
import gradio as gr
|
|
|
|
| 9 |
|
| 10 |
model_name = "scb10x/typhoon2-qwen2vl-7b-vision-instruct"
|
| 11 |
model = Qwen2VLForConditionalGeneration.from_pretrained(
|
|
@@ -37,7 +38,7 @@ theme = gr.themes.Soft(
|
|
| 37 |
neutral_hue="stone",
|
| 38 |
)
|
| 39 |
|
| 40 |
-
|
| 41 |
def bot_streaming(message, history, max_new_tokens=512):
|
| 42 |
txt = message["text"]
|
| 43 |
|
|
|
|
| 6 |
from PIL import Image
|
| 7 |
from threading import Thread
|
| 8 |
import gradio as gr
|
| 9 |
+
import spaces
|
| 10 |
|
| 11 |
model_name = "scb10x/typhoon2-qwen2vl-7b-vision-instruct"
|
| 12 |
model = Qwen2VLForConditionalGeneration.from_pretrained(
|
|
|
|
| 38 |
neutral_hue="stone",
|
| 39 |
)
|
| 40 |
|
| 41 |
+
@spaces.GPU
|
| 42 |
def bot_streaming(message, history, max_new_tokens=512):
|
| 43 |
txt = message["text"]
|
| 44 |
|