Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -41,13 +41,14 @@ def multimodal_prompt(user_input, system_prompt="You are an expert medical analy
|
|
41 |
return response_text
|
42 |
|
43 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
44 |
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
|
52 |
class ChatBot:
|
53 |
def __init__(self):
|
|
|
41 |
return response_text
|
42 |
|
43 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
44 |
+
model_name = "OpenLLM-France/Claire-Mistral-7B-0.1"
|
45 |
|
46 |
+
tokenizer = transformers.AutoTokenizer.from_pretrained(model_name)
|
47 |
+
model = transformers.AutoModelForCausalLM.from_pretrained(model_name,
|
48 |
+
device_map="auto",
|
49 |
+
torch_dtype=torch.bfloat16,
|
50 |
+
load_in_4bit=True # For efficient inference, if supported by the GPU card
|
51 |
+
)
|
52 |
|
53 |
class ChatBot:
|
54 |
def __init__(self):
|