Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ from transformers import TextIteratorStreamer
|
|
6 |
import time
|
7 |
from threading import Thread
|
8 |
import torch
|
|
|
9 |
|
10 |
model_id = "microsoft/Phi-3-vision-128k-instruct"
|
11 |
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="cuda", trust_remote_code=True, torch_dtype="auto")
|
@@ -20,7 +21,7 @@ PLACEHOLDER = """
|
|
20 |
</div>
|
21 |
"""
|
22 |
|
23 |
-
|
24 |
def bot_streaming(message, history):
|
25 |
print(f'message is - {message}')
|
26 |
print(f'history is - {history}')
|
|
|
6 |
import time
|
7 |
from threading import Thread
|
8 |
import torch
|
9 |
+
import spaces
|
10 |
|
11 |
model_id = "microsoft/Phi-3-vision-128k-instruct"
|
12 |
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="cuda", trust_remote_code=True, torch_dtype="auto")
|
|
|
21 |
</div>
|
22 |
"""
|
23 |
|
24 |
+
@spaces.GPU
|
25 |
def bot_streaming(message, history):
|
26 |
print(f'message is - {message}')
|
27 |
print(f'history is - {history}')
|